-
Notifications
You must be signed in to change notification settings - Fork 89
Functions List
Nobody-x edited this page Nov 28, 2016
·
2 revisions
Better list here : https://www.sourcemodplugins.org/smlib/functionlist
// File: arrays.inc
stock Array_FindValue(any:array[], size, any:value, start=0);
stock Array_FindString(const String:array[][], size, const String:str[], bool:caseSensitive=true, start=0);
stock Array_FindLowestValue(any:array[], size, start=0);
stock Array_FindHighestValue(any:array[], size, start=0);
stock Array_Fill(any:array[], size, any:value, start=0);
stock Array_Copy(const any:array[], any:newArray[], size);
// File: clients.inc
stock Client_SetHideHud(client, flags);
stock bool:Client_IsValid(client, bool:checkConnected=true);
stock bool:Client_IsIngame(client);
stock bool:Client_IsIngameAuthorized(client);
stock Client_FindBySteamId(const String:auth[]);
stock Client_FindByName(const String:name[], bool:partOfName=true, bool:caseSensitive=false);
stock Obs_Mode:Client_GetObserverMode(client);
stock bool:Client_SetObserverMode(client, Obs_Mode:mode, bool:updateMoveType=true);
stock Obs_mode:Client_GetObserverLastMode(client);
stock Client_SetObserverLastMode(client, Obs_Mode:mode);
stock Client_GetViewOffset(client, Float:vec[3]);
stock Client_SetViewOffset(client, Float:vec[3]);
stock Client_GetObserverTarget(client);
stock Client_SetObserverTarget(client, entity, bool:resetFOV=true);
stock Client_GetFOV(client);
stock Client_SetFOV(client, value);
stock bool:Client_DrawViewModel(client);
stock Client_SetDrawViewModel(client, bool:drawViewModel);
stock Client_SetThirdPersonMode(client, enable=true);
stock Client_IsInThirdPersonMode(client);
stock bool:Client_ScreenFade(client, duration, mode, holdtime=-1, r=0, g=0, b=0, a=255, bool:reliable=true);
stock Client_GetClones(client, cloneList[]);
stock bool:Client_IsOnLadder(client);
stock Water_Level:Client_GetWaterLevel(client);
stock Float:Client_GetSuitSprintPower(client);
stock Client_SetSuitSprintPower(client, Float:power);
stock Client_GetCount(bool:countInGameOnly=true, bool:countFakeClients=true);
stock Client_GetFakePing(client, bool:goldSource=true);
stock Client_GetClosestToClient(client);
stock Client_GetLastPlaceName(client, String:buffer[], size);
stock Client_GetScore(client);
stock Client_SetScore(client, value);
stock Client_GetDeaths(client);
stock Client_SetDeaths(client, value);
stock Client_GetArmor(client);
stock Client_SetArmor(client, value);
stock Float:Client_GetSuitPower(client);
stock Client_SetSuitPower(client, Float:value);
stock Client_GetActiveDevices(client);
stock Float:Client_GetNextDecalTime(client);
stock bool:Client_CanSprayDecal(client);
stock Client_GetVehicle(client);
stock bool:Client_IsInVehicle(client);
stock Client_RemoveAllDecals(client);
stock bool:Client_ExitVehicle(client);
stock bool:Client_RawAudio(client, const emitter, const String:soundfile[], Float:length = 0.0, pitch = 100);
stock bool:Client_RawAudioToAll(const emitter, const String:soundfile[], Float:length = 0.0, pitch = 100);
stock Client_Impulse(client, value);
stock Client_GetWeaponsOffset(client);
stock Client_GetActiveWeapon(client);
stock Client_GetActiveWeaponName(client, String:buffer[], size);
stock Client_SetActiveWeapon(client, weapon);
stock bool:Client_ChangeWeapon(client, const String:className[]);
stock Client_ChangeToLastWeapon(client);
stock Client_GetLastActiveWeapon(client);
stock bool:Client_GetLastActiveWeaponName(client, String:buffer[], size);
stock Client_SetLastActiveWeapon(client, weapon);
stock Client_EquipWeapon(client, weapon, bool:switchTo=false);
stock bool:Client_DetachWeapon(client, weapon);
stock Client_GiveWeapon(client, const String:className[], bool:switchTo=true);
stock Client_GiveWeaponAndAmmo(client, const String:className[], bool:switchTo=true, primaryAmmo=-1, secondaryAmmo=-1, primaryClip=-1, secondaryClip=-1);
stock bool:Client_RemoveWeapon(client, const String:className[], bool:firstOnly=true, bool:clearAmmo=false);
stock Client_RemoveAllWeapons(client, const String:exclude[]="", bool:clearAmmo=false);
stock Client_HasWeapon(client, const String:className[]);
stock Client_GetWeapon(client, const String:className[]);
stock Client_GetWeaponBySlot(client, slot);
stock Client_GetDefaultWeapon(client);
stock bool:Client_GetDefaultWeaponName(client, String:buffer[], size);
stock Client_GetFirstWeapon(client);
stock Client_GetWeaponCount(client);
stock bool:Client_IsReloading(client);
stock bool:Client_SetWeaponClipAmmo(client, const String:className[], primaryClip=-1, secondoaryClip=-1);
stock bool:Client_GetWeaponPlayerAmmo(client, const String:className[], &primaryAmmo=-1, &secondaryAmmo=-1);
stock bool:Client_SetWeaponPlayerAmmo(client, const String:className[], primaryAmmo=-1, secondaryAmmo=-1);
stock Client_SetWeaponPlayerAmmoEx(client, weapon, primaryAmmo=-1, secondaryAmmo=-1);
stock Client_SetWeaponAmmo(client, const String:className[], primaryAmmo=-1, secondaryAmmo=-1, primaryClip=-1, secondaryClip=-1);
stock Client_GetNextWeapon(client, &index = 0);
stock bool:Client_PrintHintText(client, const String:format[], any:...);
stock Client_PrintHintTextToAll(const String:format[], any:...);
stock bool:Client_PrintKeyHintText(client, const String:format[], any:...);
stock Client_PrintKeyHintTextToAll(const String:format[], any:...);
stock Client_PrintToChatRaw(client, const String:message[], subject=0, bool:isChat=false);
stock Client_PrintToChat(client, bool:isChat, const String:format[], any:...);
stock Client_PrintToChatExclude(client);
stock Client_PrintToChatAll(bool:isChat, const String:format[], any:...);
stock Client_PrintToChatEx(clients[], numClients, bool:isChat, const String:format[], any:...);
stock Client_PrintToConsole(client, const String:format[], any:...);
stock Client_Print(client, ClientHudPrint:destination, const String:format[], any:...);
stock Client_Reply(client, const String:format[], any:...);
stock bool:Client_Shake(client, command=SHAKE_START, Float:amplitude=50.0, Float:frequency=150.0, Float:duration=3.0);
stock bool:Client_IsAdmin(client);
stock bool:Client_HasAdminFlags(client, flags=ADMFLAG_GENERIC);
stock bool:Client_IsInAdminGroup(client, const String:groupName[], bool:caseSensitive=true);
stock bool:Client_IsLookingAtWall(client, Float:distance=40.0);
stock Client_GetClass(client);
stock Client_SetClass(client, class, bool:persistant=false);
stock Client_GetButtons(client);
stock Client_SetButtons(client, buttons);
stock Client_AddButtons(client, buttons);
stock Client_RemoveButtons(client, buttons);
stock Client_ClearButtons(client);
stock bool:Client_HasButtons(client, buttons);
stock Client_GetChangedButtons(client);
stock Client_SetMaxSpeed(client, Float:value);
stock Client_SetScreenOverlay(client, const String:path[]);
stock Client_SetScreenOverlayForAll(const String:path[]);
stock Client_Mute(client);
stock Client_UnMute(client);
stock bool:Client_IsMuted(client);
stock bool:Client_MatchesFilter(client, flags);
stock Client_Get(clients[], flags=CLIENTFILTER_ALL);
stock Client_GetRandom(flags=CLIENTFILTER_ALL);
stock Client_GetNext(flags, start=1);
stock Float:Client_GetMapTime(client);
// File: colors.inc
stock Color_ChatSetSubject(client);
stock Color_ChatClearSubject();
stock Color_ParseChatText(const String:str[], String:buffer[], size);
stock Color_TagToCode(const String:tag[], &subject=-1);
stock Color_StripFromChatText(const String:input[], String:output[], size);
// File: concommands.inc
stock bool:ConCommand_HasFlags(const String:command[], const flags);
stock ConCommand_AddFlags(const String:command[], const flags);
stock ConCommand_RemoveFlags(const String:command[], const flags);
// File: convars.inc
stock bool:Convar_HasFlags(Handle:convar, flags);
stock Convar_AddFlags(Handle:convar, flags);
stock Convar_RemoveFlags(Handle:convar, flags);
stock bool:Convar_IsValidName(const String:name[]);
// File: crypt.inc
stock Crypt_Base64Encode(const String:sString[], String:sResult[], len, sourcelen=0);
stock Crypt_Base64Decode(const String:sString[], String:sResult[], len);
stock Crypt_Base64MimeToUrl(const String:sString[], String:sResult[], len);
stock Crypt_Base64UrlToMime(const String:sString[], String:sResult[], len);
stock Crypt_MD5(const String:str[], String:output[], maxlen);
stock Crypt_RC4Encode(const String:input[], const String:pwd[], String:output[], maxlen);
stock Crypt_RC4EncodeBinary(const String:input[], str_len, const String:pwd[], String:output[], maxlen);
// File: debug.inc
stock Debug_FloatArray(const Float:array[], size=3);
// File: dynarrays.inc
stock bool:DynArray_GetBool(Handle:array, index, block=0, bool:asChar=false);
// File: edicts.inc
stock Edict_FindByName(const String:name[]);
stock Edict_FindByHammerId(hammerId);
stock Edict_GetClosest(Float:vecOrigin_center[3], bool:clientsOnly=false, ignoreEntity=-1);
stock Edict_GetClosestToEdict(edict, bool:clientsOnly=false);
// File: effects.inc
stock bool:Effect_DissolveEntity(entity, DissolveType:dissolveType=DISSOLVE_NORMAL);
stock bool:Effect_DissolvePlayerRagDoll(client, DissolveType:dissolveType=DISSOLVE_NORMAL);
stock Effect_Fade(entity, fadeOut=true, kill=false, fast=true, EffectCallback:callback=INVALID_FUNCTION, any:data=0);
stock Effect_FadeIn(entity, fast=true, EffectCallback:callback=INVALID_FUNCTION, any:data=0);
stock Effect_FadeOut(entity, kill=false, fast=true, EffectCallback:callback=INVALID_FUNCTION, any:data=0);
stock Effect_DrawBeamBoxToClient();
stock Effect_DrawBeamBoxToAll();
stock Effect_DrawBeamBox();
// File: entities.inc
stock Entity_IsValid(entity);
stock Entity_FindByName(const const String:name[], const String:class[]="");
stock Entity_FindByHammerId(hammerId, const String:class[]="");
stock Entity_FindByClassName(startEntity, const String:className[]);
stock bool:Entity_ClassNameMatches(entity, const String:className[], partialMatch=false);
stock bool:Entity_NameMatches(entity, const String:name[]);
stock Entity_GetName(entity, String:buffer[], size);
stock Entity_SetName(entity, const String:name[], any:...);
stock Entity_GetClassName(entity, String:buffer[], size);
stock Entity_SetClassName(entity, const String:className[]);
stock Entity_GetTargetName(entity, String:buffer[], size);
stock Entity_SetTargetName(entity, const String:name[], any:...);
stock Entity_GetGlobalName(entity, String:buffer[], size);
stock Entity_SetGlobalName(entity, const String:name[], any:...);
stock Entity_GetParentName(entity, String:buffer[], size);
stock Entity_SetParentName(entity, const String:name[], any:...);
stock Entity_GetHammerId(entity);
stock Float:Entity_GetRadius(entity);
stock Entity_SetRadius(entity, Float:radius);
stock Entity_GetMinSize(entity, Float:vec[3]);
stock Entity_SetMinSize(entity, Float:vecMins[3]);
stock Entity_GetMaxSize(entity, Float:vec[3]);
stock Entity_SetMaxSize(entity, Float:vecMaxs[3]);
stock Entity_SetMinMaxSize(entity, Float:vecMins[3], Float:vecMaxs[3]);
stock Entity_GetSpawnFlags(entity);
stock Entity_SetSpawnFlags(entity, flags);
stock Entity_AddSpawnFlags(entity, flags);
stock Entity_RemoveSpawnFlags(entity, flags);
stock Entity_ClearSpawnFlags(entity);
stock bool:Entity_HasSpawnFlags(entity, flags);
stock Entity_Flags:Entity_GetEFlags(entity);
stock Entity_SetEFlags(entity, Entity_Flags:flags);
stock Entity_AddEFlags(entity, Entity_Flags:flags);
stock Entity_RemoveEFlags(entity, Entity_Flags:flags);
stock bool:Entity_HasEFlags(entity, Entity_Flags:flags);
stock Entity_MarkSurrBoundsDirty(entity);
stock Entity_GetFlags(entity);
stock Entity_SetFlags(entity, flags);
stock Entity_AddFlags(entity, flags);
stock Entity_RemoveFlags(entity, flags);
stock Entity_ToggleFlag(entity, flag);
stock Entity_ClearFlags(entity);
stock SolidFlags_t:Entity_GetSolidFlags(entity);
stock Entity_SetSolidFlags(entity, SolidFlags_t:flags);
stock Entity_AddSolidFlags(entity, SolidFlags_t:flags);
stock Entity_RemoveSolidFlags(entity, SolidFlags_t:flags);
stock Entity_ClearSolidFlags(entity);
stock bool:Entity_SolidFlagsSet(entity, SolidFlags_t:flagMask);
stock SolidType_t:Entity_GetSolidType(entity);
stock Entity_SetSolidType(entity, SolidType_t:value);
stock bool:Entity_IsSolid(entity);
stock Entity_GetModel(entity, String:buffer[], size);
stock Entity_SetModel(entity, const String:model[]);
stock Entity_GetModelIndex(entity);
stock Entity_SetModelIndex(entity, index);
stock Entity_SetMaxSpeed(entity, Float:value);
stock Collision_Group_t:Entity_GetCollisionGroup(entity);
stock Entity_SetCollisionGroup(entity, Collision_Group_t:value);
stock Entity_GetAbsOrigin(entity, Float:vec[3]);
stock Entity_SetAbsOrigin(entity, Float:vec[3]);
stock Entity_GetAbsAngles(entity, Float:vec[3]);
stock Entity_SetAbsAngles(entity, Float:vec[3]);
stock Entity_GetLocalVelocity(entity, Float:vec[3]);
stock Entity_SetLocalVelocity(entity, const Float:vec[3]);
stock Entity_GetBaseVelocity(entity, Float:vec[3]);
stock Entity_SetBaseVelocity(entity, const Float:vec[3]);
stock Entity_GetAbsVelocity(entity, Float:vec[3]);
stock Entity_SetAbsVelocity(entity, const Float:vec[3]);
stock bool:Entity_IsLocked(entity);
stock Entity_Lock(entity);
stock Entity_UnLock(entity);
stock Entity_GetHealth(entity);
stock Entity_SetHealth(entity, value, ignoreMax=false, kill=true);
stock Entity_AddHealth(entity, value, ignoreMax=false, kill=true);
stock Entity_TakeHealth(entity, value, ignoreMax=false, kill=true);
stock Entity_GetMaxHealth(entity);
stock Entity_SetMaxHealth(entity, value);
stock Float:Entity_GetDistanceOrigin(entity, const Float:vec[3]);
stock Float:Entity_GetDistance(entity, target);
stock bool:Entity_InRange(entity, target, Float:distance);
stock bool:Entity_EnableMotion(entity);
stock bool:Entity_DisableMotion(entity);
stock Entity_Freeze(entity);
stock Entity_UnFreeze(entity);
stock Entity_PointAtTarget(entity, target, const String:name[]="");
stock Entity_PointHurtAtTarget(entity, target, const String:name[]="");
stock bool:Entity_IsPlayer(entity);
stock Entity_Create(const String:className[], ForceEdictIndex=-1);
stock bool:Entity_Kill(kenny);
stock Entity_KillAllByClassName(const String:className[]);
stock Entity_GetOwner(entity);
stock Entity_SetOwner(entity, newOwner);
stock Entity_GetGroundEntity(entity);
stock bool:Entity_Hurt(entity, damage, attacker=0, damageType=DMG_GENERIC, const String:fakeClassName[]="");
stock Entity_GetParent(entity);
stock Entity_RemoveParent(entity);
stock Entity_SetParent(entity, parentEntity);
// File: files.inc
stock bool:File_GetBaseName(const String:path[], String:buffer[], size);
stock bool:File_GetDirName(const String:path[], String:buffer[], size);
stock bool:File_GetFileName(const String:path[], String:buffer[], size);
stock File_GetExtension(const String:path[], String:buffer[], size);
stock File_AddToDownloadsTable(const String:path[], bool:recursive=true, const String:ignoreExts[][]=_smlib_empty_twodimstring_array, size=0);
stock File_ReadDownloadList(const String:path[]);
stock File_LoadTranslations(const String:file[]);
stock File_ToString(const String:path[], String:buffer[], size);
stock bool:File_StringToFile(const String:path[], String:str[]);
stock bool:File_Copy(const String:source[], const String:destination[]);
stock bool:File_CopyRecursive(const String:path[], const String:destination[], bool:stop_on_error=false, dirMode=493);
// File: game.inc
stock bool:Game_End();
stock bool:Game_EndRound(team=0, bool:forceMapReset=false, bool:switchTeams=false);
// File: general.inc
stock PrecacheMaterial(const String:material[]);
stock bool:IsMaterialPrecached(const String:material[]);
stock PrecacheParticleSystem(const String:particleSystem[]);
stock bool:IsParticleSystemPrecached(const String:particleSystem[]);
stock FindStringIndexByTableName(const String:table[], const String:str[]);
stock FindStringIndex2(tableidx, const String:str[]);
stock LongToIP(ip, String:buffer[], size);
stock IPToLong(const String:ip[]);
stock bool:IsIPLocal(ip);
// File: math.inc
stock any:Math_Abs(any:number);
stock bool:Math_VectorsEqual(Float:vec1[3], Float:vec2[3], Float:tolerance=0.0);
stock any:Math_Min(any:value, any:min);
stock any:Math_Max(any:value, any:max);
stock any:Math_Clamp(any:value, any:min, any:max);
stock bool:Math_IsInBounds(any:value, any:min, any:max);
stock any:Math_Overflow(any:value, any:min, any:max);
stock Math_GetRandomInt(min, max);
stock Float:Math_GetRandomFloat(Float:min, Float:max);
stock Math_GetPercentage(value, all);
stock Float:Math_GetPercentageFloat(Float:value, Float:all);
stock Math_MoveVector(const Float:start[3], const Float:end[3], Float:scale, Float:output[3]);
stock Float:Math_UnitsToMeters(Float:units);
stock Float:Math_UnitsToFeet(Float:units);
// File: server.inc
stock Server_GetIP(bool:public_=true);
stock bool:Server_GetIPString(String:buffer[], size, bool:public_=true);
stock Server_GetPort();
stock bool:Server_GetHostName(String:buffer[], size);
// File: sql.inc
stock SQL_TQueryF(Handle:database, SQLTCallback:callback, any:data, DBPriority:priority=DBPrio_Normal, const String:format[], any:...);
stock SQL_FetchIntByName(Handle:query, String:fieldName[], &DBResult:result=DBVal_Error);
stock bool:SQL_FetchBoolByName(Handle:query, String:fieldName[], &DBResult:result=DBVal_Error);
stock Float:SQL_FetchFloatByName(Handle:query, String:fieldName[], &DBResult:result=DBVal_Error);
stock SQL_FetchStringByName(Handle:query, String:fieldName[], String:buffer[], maxlength, &DBResult:result=DBVal_Error);
// File: strings.inc
stock bool:String_IsNumeric(const String:str[]);
stock String_Trim(const String:str[], String:output[], size, const String:chrs[]=" \t\r\n");
stock String_RemoveList(String:buffer[], String:removeList[][], size, bool:caseSensitive=false);
stock String_ToLower(const String:input[], String:output[], size);
stock String_ToUpper(const String:input[], String:output[], size);
stock String_GetRandom(String:buffer[], size, length=32, const String:chrs[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234556789");
// File: teams.inc
stock bool:Team_HaveAllPlayers(bool:countFakeClients=true);
stock Team_GetClientCount(team, flags=0);
stock Team_GetClientCounts(&team1=0, &team2=0, flags=0);
stock bool:Team_GetName(index, String:str[], size);
stock bool:Team_SetName(index, const String:name[]);
stock Team_GetScore(index);
stock bool:Team_SetScore(index, score);
stock Team_EdictGetNum(edict);
stock bool:Team_IsValid(index);
stock Team_EdictIsValid(edict);
stock Team_GetEdict(index);
stock Team_GetAnyClient(index);
// File: vehicles.inc
stock Vehicle_GetDriver(vehicle);
stock bool:Vehicle_HasDriver(vehicle);
stock bool:Vehicle_ExitDriver(vehicle);
stock bool:Vehicle_TurnOn(vehicle);
stock bool:Vehicle_TurnOff(vehicle);
stock bool:Vehicle_Lock(vehicle);
stock bool:Vehicle_Unlock(vehicle);
stock bool:Vehicle_IsValid(vehicle);
stock bool:Vehicle_GetScript(vehicle, String:buffer[], size);
stock bool:Vehicle_SetScript(vehicle, String:script[]);
// File: weapons.inc
stock Weapon_GetOwner(weapon);
stock Weapon_SetOwner(weapon, entity);
stock Weapon_IsValid(weapon);
stock Weapon_Create(const String:className[], Float:absOrigin[3], Float:absAngles[3]);
stock Weapon_CreateForOwner(client, const String:className[]);
stock Weapon_GetSubType(weapon, value);
stock bool:Weapon_IsReloading(weapon);
stock Weapon_GetState(weapon);
stock bool:Weapon_FiresUnderWater(weapon);
stock Weapon_SetFiresUnderWater(weapon, bool:can=true);
stock bool:Weapon_FiresUnderWaterAlt(weapon);
stock Weapon_SetFiresUnderWaterAlt(weapon, bool:can=true);
stock Weapon_GetPrimaryAmmoType(weapon);
stock Weapon_GetSecondaryAmmoType(weapon);
stock Weapon_GetPrimaryClip(weapon);
stock Weapon_SetPrimaryClip(weapon, value);
stock Weapon_GetSecondaryClip(weapon);
stock Weapon_SetSecondaryClip(weapon, value);
stock Weapon_SetClips(weapon, primary, secondary);
stock Weapon_GetPrimaryAmmoCount(weapon);
stock Weapon_SetPrimaryAmmoCount(weapon, value);
stock Weapon_GetSecondaryAmmoCount(weapon);
stock Weapon_SetSecondaryAmmoCount(weapon, value);
stock Weapon_SetAmmoCounts(weapon, primary, secondary);
stock Weapon_GetViewModelIndex(weapon);
stock Weapon_SetViewModelIndex(weapon, index);
// File: world.inc
stock World_GetMaxs(Float:vec[3]);