29.12.2011, 11:57
Im having a problem with checking is player online. So, I have an optional parameter (R). If player didnt used the param, the value will be -1. So, I want to do this: if player is offline, it would return that player is offline. BUT, if player didnt used the param (R) it would continue the command. Now it always return that player is offline, even I didnt used the param
pawn Код:
new i;
if (sscanf(params, "R(-1)", i))
{
return SendClientMessage(playerid, 0xFF0000FF, "Komandos naudojimas: {FFFF00}/(lok)uoti [vardas]");
}
if (i == playerid || i == INVALID_PLAYER_ID && i != -1)
{
return SendClientMessage(playerid, 0xFF0000FF, "Ћaidėjas yra neprisijungęs!");
}