[HELP] My Pawno doesn't compile!
#5

1) You missed a curly bracket at the end of this line: [pawno] if(PlayerInfo[playerid][Level] >= 1) [/pawno]
2) Do you have an array called PlayerInfo made? Or are you just seeing it in other scripts and thinking it's native?
3) And more.

[pawno]public OnPlayerCommandText(playerid, cmdtext[])
{
// CLOSE GARAGE
if (strcmp(cmdtext, "/closegarage", true) == 0)
{
if(PlayerInfo[playerid][Level] > 0)
{
MoveObject(gate2, -1371.383057, 922.077637, 5.851798,2);
SendClientMessage(playerid, 0xFFCCFFFF, "The garage was closed.");
return 1;
}
else
{
SendClientMessage(playerid, 0xCCFFFFFF, "You are not an administrator; garage was not closed.");
return 1;
}
}
// OPEN GARAGE
if (strcmp(cmdtext, "/opengarage", true) == 0)
{
if(PlayerInfo[playerid][Level] > 0)
{
MoveObject(gate2, -1371.383057, 922.077637, -2.851798,2);
SendClientMessage(playerid, 0xFFCCFFFF, "The garage was opened.");
return 1;
}
else
{
SendClientMessage(playerid, 0xCCFFFFFF, "You are not an administrator; garage was not opened.");
return 1;
}
}
// CLOSE GATE
if (strcmp(cmdtext, "/closegate", true) == 0)
{
if(PlayerInfo[playerid][Level] > 0)
{
MoveObject(gate1, -1465.871216, 1007.168152, 8.958706,2);
SendClientMessage(playerid, 0xFFCCFFFF, "The gate was closed.");
return 1;
}
else
{
SendClientMessage(playerid, 0xCCFFFFFF, "You are not an administrator; gate was not closed.");
return 1;
}
}
// OPEN GATE
if (strcmp(cmdtext, "/opengate", true) == 0)
{
if(PlayerInfo[playerid][Level] > 0)
{
MoveObject(gate1, -1465.871216, 1007.168152, 1.958706,2);
SendClientMessage(playerid, 0xFFCCFFFF, "The gate was opened.");
return 1;
}
else
{
SendClientMessage(playerid, 0xCCFFFFFF, "You are not an administrator; gate was not opened.");
return 1;
}
}
}[/pawno]

Try that.
Reply


Messages In This Thread
[HELP] My Pawno doesn't compile! - by killerpiggy - 28.02.2010, 17:57
Re: [HELP] My Pawno doesn't compile! - by aircombat - 28.02.2010, 18:02
Re: [HELP] My Pawno doesn't compile! - by killerpiggy - 28.02.2010, 18:13
Re: [HELP] My Pawno doesn't compile! - by aircombat - 28.02.2010, 18:52
Re: [HELP] My Pawno doesn't compile! - by FoxtrotZulu - 28.02.2010, 19:20
Re: [HELP] My Pawno doesn't compile! - by killerpiggy - 01.03.2010, 16:08
Re: [HELP] My Pawno doesn't compile! - by Koomike - 16.02.2011, 01:09
Re: [HELP] My Pawno doesn't compile! - by Zack9764 - 16.02.2011, 01:20

Forum Jump:


Users browsing this thread: 1 Guest(s)