07.08.2012, 19:52
EDIT: I've fixed the error by myself, any mod please delete this thread.
CMD:helpnewbie(playerid, params[])
{
new Float:x, Float:y, Float:z, pid, name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(pid, x, y, z);
if(sscanf(params,"u", pid)) return SendClientMessage(playerid, -1, "USAGE: /helpnewbie [playerid/PartOfName]");
if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command !");
if(PlayerInfo[playerid][pHelper] >= 1 && HelpMe[playerid] == 1 ) // you had do brackets here )) but it's only one!
{
SetPlayerPos(playerid, x, y, z);
format(string, sizeof(string), "* You have teleported to %s !", name);
SendClientMessage(playerid, COLOR_GRAD2, string);
SendClientMessage(playerid, COLOR_YELLOW, "* To return where you were, type in /helpnewbie again");
}
else
{
SetPlayerPos(playerid, x, y, z);
}
return 1;
}
pawn Код:
Regards, FalconX |