Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #include sdkhooks
- #pragma tabsize 0
- Handle sdkCallPushPlayer;
- public OnPluginStart()
- {
- Handle GameConf = LoadGameConfigFile("MolotovGame");
- if(GameConf == INVALID_HANDLE)
- {
- SetFailState("Couldn't find the offsets and signatures file. Please, check that it is installed correctly.");
- }
- StartPrepSDKCall(SDKCall_Static);
- PrepSDKCall_SetFromConf(GameConf, SDKConf_Signature, "SpawnTank");
- PrepSDKCall_AddParameter(SDKType_Vector, SDKPass_ByRef);
- PrepSDKCall_AddParameter(SDKType_Vector, SDKPass_ByRef);
- sdkCallPushPlayer = EndPrepSDKCall();
- RegConsoleCmd("sm_tank", iTank)
- }
- public Action iTank(client, args)
- {
- if(!IsValidClient(client)) return;
- float pos[3];
- GetEntPropVector(client, PropType:0, "m_vecOrigin", pos, 0);
- int tank = SDKCall(sdkCallPushPlayer, pos, pos)
- DispatchSpawn(tank);
- TeleportEntity(tank, pos, NULL_VECTOR, NULL_VECTOR)
- }
- stock bool:IsValidClient( client )
- {
- if ( client < 1 || client > MaxClients ) return false;
- if ( !IsClientConnected( client )) return false;
- if ( !IsClientInGame( client )) return false;
- if ( GetClientTeam( client ) != 2 ) return false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment