21.08.2014, 14:46
hello guys i am currently working on my AdminSystem and im doing a code which is when an rcon Admin chat ingame [RCON ADMIN] will be behind his/her name because i have no Admin levels yet :P but i am having a little problem with it, when compiling i get 1 error which is :
and here's the code
the line that is causing the problem is
but its something is weird because my restart command to restart the server have this else and it works correctly
here's the code
Hope you can help me Thank you.
pawn Код:
C:\Users\xxx\Desktop\SAMP Servers\SAMP Gamemode\GM And FS\GM\NWS.pwn(690) : error 029: invalid expression, assumed zero
pawn Код:
public OnPlayerText(playerid, text[])
{
IsPlayerAdmin(playerid);
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(string, sizeof(string), "[RCON ADMIN] %s (%d): %s", name, playerid, text);
SendPlayerMessageToAll(playerid, string);
}
else
{
new string2[128];
new name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name2, sizeof (name2));
format(string2, sizeof(string2), "%s (%d): %s", name2, playerid, text);
SendPlayerMessageToAll(playerid, string2);
}
return 0;
}
pawn Код:
{
else // this one
}
here's the code
pawn Код:
CMD:restart(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
SendRconCommand("gmx");
}
else
{
SendClientMessage(playerid, 0xFF6347AA, "[RCON COMMAND] You Need to Be Loged in as RCON Admin, to use that command");
}
return 1;
}