my admin teleport to player
#1

// admin tele to player//////////////////////////////////////
dcmd_tele(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
static ID, Float:locx, Float:locy, Float:locz;
if (sscanf(params, "i", ID))
{
GetPlayerPos(ID, locx, locy, locz);
SetPlayerPos(playerid, locx, locy, locz);
return 1;
}

return 1;
}

else
{
SendClientMessage(playerid, 0xFF0000FF, "You do not have permission to use this command");
return 1;
}
}


whats wrong with it I dont get any errors
Reply
#2

dcmd_tele(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You do not have permission to use this command");

new ID, Float:locx, Float:locy, Float:locz;
if (sscanf(params, "i", ID)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You must use /tele [id]");
else
{
GetPlayerPos(ID, locx, locy, locz);
SetPlayerPos(playerid, locx, locy, locz);
return 1;
}
}
Reply
#3

thanks
Reply
#4

Next time use [ pawn] [/pawn]
Both of you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)