26.03.2011, 18:10
pawn Код:
dcmd_annoy(playerid,params[])
{
#pragma unused params
if(PlayerInfo[playerid][LoggedIn] == 1)
{
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /annoy [playerid] [reason]");
new player1, playername[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1)) return SendClientMessage(playerid,red,"Player not connected.");
if(cow_victim != -1) return SendClientMessage(playerid,red,"Sorry! It seems like your cow has already been stolen by another administrator.");
#if ALLOW_ANNOY == false
return SendClientMessage(playerid,red,"Sorry! This feature has been disabled.");
#else
AnnoyPlayer(player1);
format(string, sizeof(string),"**COW: %s (%d) (ADMIN COW) %s ",playername, player1, params[2]); SendClientMessageToAll(COLOR_PINK,string);
SendClientMessage(playerid,red,"You have released the cow.");
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /annoy [playerid] [reason]");
player1 = strval(tmp);
#endif
}
else
{
new playername[MAX_PLAYER_NAME],player1, string[128];
format(string,sizeof(string),"**COW: %s (%d) (ADMIN COW) No Reason Given.",playername,player1,params[2]); SendClientMessageToAll(COLOR_PINK,string);
return SendClientMessage(playerid,red,"You have released the cow.");
} else return SendClientMessage(playerid,red,"You Are Not Authorized To Use That Command.");
} else return SendClientMessage(playerid,red,"ERROR: You Are Not A High Enough Level To Use This Command.");
}
pawn Код:
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9909) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\ladmin.pwn(9909) : error 001: expected token: ";", but found "return"
pawn Код:
} else return SendClientMessage(playerid,red,"You Are Not Authorized To Use That Command.");