SA-MP Forums Archive
my admin teleport to player - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: my admin teleport to player (/showthread.php?tid=331511)



my admin teleport to player - squomp - 05.04.2012

// 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


Re: my admin teleport to player - DeathTone - 05.04.2012

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;
}
}


Re: my admin teleport to player - squomp - 05.04.2012

thanks


Re: my admin teleport to player - dannyk0ed - 05.04.2012

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