public NearGatelv() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerToPoint(10.0, i, 2237.188965, 2448.813232, 9.845795) && HasPGP[i] == 1) { MoveObject(pdgateLV, 2237.127930, 2458.059570, 9.840160, 3.5); }else{ MoveObject(pdgateLV, 2237.188965, 2448.813232, 9.845795, 3.5); } } } }
if(PlayPlayerSound...
Originally Posted by Naruto4
Thanks mate.(working on it,i let you know if it works)
|
#define KEY_HORN 2
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_HORN) // If the player is pressing the horn key.
{
if(PlayerToPoint(10.0, i, 2237.188965, 2448.813232, 9.845795) && HasPGP[i] == 1)
{
new sendername[24],string[128];
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, sizeof(string), "%s pushes a button in his pocket to open the HQ Gate.", sendername);
SendClientMessageToAll(0x00E100FF, string);
MoveObject(pdgateLV, 2237.127930, 2458.059570, 9.840160, 3.5); //open the gate
SetTimer(CloseGate, 7000, 0);
}
}
return 1;
}
forward CloseGate();
public CloseGate()
{
MoveObject(pdgateLV, 2237.188965, 2448.813232, 9.845795, 3.5); // close the gate
return 1;
}
i=0,i<MAX_PLAYERS .............
C:\Users\Mich\Desktop\LV Role Play\gamemodes\rp.pwn(26820) : error 017: undefined symbol "i" C:\Users\Mich\Desktop\LV Role Play\gamemodes\rp.pwn(26827) : error 076: syntax error in the expression, or invalid function call Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
SetTimer(ClosePDGate1, 7000, 0);
if(PlayerToPoint(10.0, i, 2237.188965, 2448.813232, 9.845795) && HasPGP[i] == 1)
if(PlayerToPoint(10.0, playerid, 2237.188965, 2448.813232, 9.845795) && HasPGP[i] == 1)
SetTimer(CloseGate, 7000, 0);
SetTimer("CloseGate", 7000, 0);
C:\Users\Mich\Desktop\LV Role Play\gamemodes\rp.pwn(26827) : error 076: syntax error in the expression, or invalid function call Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Originally Posted by Naruto4
Код:
C:\Users\Mich\Desktop\LV Role Play\gamemodes\rp.pwn(26827) : error 076: syntax error in the expression, or invalid function call Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. sorry for bothering you guys i am very sorry |
Originally Posted by [B2K
Hustler ]
Oh, and change pawn Код:
pawn Код:
|