Gate Command created by me problem
#1

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;
}
Reply
#2

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
Reply
#3

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);
Reply
#4

pawn Код:
public OnGameModeInit()
{
cia_gate = CreateDynamicObject(980, 1355.8223, -1486.3730, 15.1283, 0.3000, 1.6200, 60.8400);
// more code
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)