Gate Command created by me problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gate Command created by me problem (
/showthread.php?tid=441901)
Gate Command created by me problem -
yaron0600 - 04.06.2013
Hey , I just created a gate command for a new faction , And the pawno is crash everytime I try to comiple that when I remove it thats compile clearly , Then somone can tell me whats the problem here ? :
Код:
new CIAGateStatus;
new cia_gate = CreateDynamicObject(980, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
CMD:ciagate(playerid, params[])
{
if(PlayerInfo[playerid][pMember] >= 7 || PlayerInfo[playerid][pLeader] == 7) return SendClientMessageEx(playerid, COLOR_YELLOW, "You're not from the C.I.A.");
{
if(CIAGateStatus == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cia_gate, 1355.8223, -1486.3730, 8.1283, 15.1283, 0.3000, 1.6200, 60.8400);
CIAGateStatus = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cia_gate, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
CIAGateStatus = 0;
}
return 1;
}
Re: Gate Command created by me problem -
Littlehelper - 04.06.2013
pawn Код:
new cia_gate = CreateDynamicObject(980, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
That is the problem.
pawn Код:
new cia_gate;
// OnGamemode callback
cia_gate = CreateDynamicObject(980, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
// Stuff
Re: Gate Command created by me problem -
yaron0600 - 04.06.2013
Good job but can u re-xplain me again where to put that ? :
Код:
cia_gate = CreateDynamicObject(980, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
Re: Gate Command created by me problem -
Littlehelper - 04.06.2013
pawn Код:
public OnGameModeInit()
{
cia_gate = CreateDynamicObject(980, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
// more code
return 1;
}