Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #pragma newdecls required
- #include <sourcemod>
- #include <sdktools>
- Handle SDK_SetNextShoveTime;
- public void OnPluginStart()
- {
- RegAdminCmd("sm_test", sm_test, ADMFLAG_ROOT);
- Handle hGameConf = LoadGameConfigFile("CSetVic");
- if( hGameConf == null )
- SetFailState("Couldn't find the offsets and signatures file. Please, check that it is installed correctly.");
- StartPrepSDKCall(SDKCall_Entity);
- if( PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, "CSetVic") == false )
- SetFailState("Could not load the \"CTerrorPlayer::CSetVic\" gamedata signature.");
- PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
- SDK_SetNextShoveTime = EndPrepSDKCall();
- if( SDK_SetNextShoveTime == null )
- SetFailState("Could not prep the \"CTerrorPlayer::CSetVic\" function.");
- }
- public Action sm_test(int client, int args)
- {
- for(int i = 1; i <= 32; i++)
- {
- if(IsValid(i))
- {
- SDKCall(SDK_SetNextShoveTime);
- return Plugin_Handled;
- }
- }
- return Plugin_Handled;
- }
- stock bool IsValid(int client)
- {
- return client > 0 && client <= MaxClients && IsClientInGame(client) && !IsClientInKickQueue(client) && IsPlayerAlive(client);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement