13.10.2011, 15:27
you forgot one { or } i the code
pawn Код:
if(strcmp(cmd, "/gotoplayer", true, 5) == 0)
{
if(PlayerInfo[playerid][pAdmin] > 0)
{
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USAGE: /goto [id]");
if(!IsNumeric(tmp)) return SendClientMessage(playerid, -1, "USAGE: /goto [id] - ID Must Be A Number.");
if(IsPlayerConnected(giveplayerid))
{
SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
new Float:x, Float:y, Float:z;
GetPlayerPos(giveplayerid, x,y,z);
SetPlayerPos(playerid, x+1,y,z);
}
else
{
format(string, sizeof(string), "%d Is Not An Active Player.", giveplayerid);
SendClientMessage(playerid, -1, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!");
}
return 1;
}