22.06.2013, 22:07
pawn Код:
CMD:goto(playerid,params[])
{
new toplayerid,Float:Pos[3],interior,vw,rogoto[512],enggoto[512];
if(sscanf(params,"u",toplayerid))
{
if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Utilizare comanda:/goto <Playerid|Name>");
else if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"Command Syntax:/goto <Playerid|Name>");
}
if(PInfo[playerid][Admin] < 2)
{
if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Trebuie sa ai minim level 2 pentru a utiliza aceasta comanda!");
else if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You must to be admin level 2 to use this command!");
}
if(!IsPlayerConnected(toplayerid))
{
if(limba[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"Acest player nu este conectat!");
else if(limba[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"This player isn't connected!");
}
GetPlayerPos(toplayerid,Pos[0],Pos[1],Pos[2]);
SetPlayerPos(playerid,Pos[0]+1,Pos[1],Pos[2]);
interior = GetPlayerInterior(toplayerid);
vw = GetPlayerVirtualWorld(toplayerid);
SetPlayerInterior(playerid,interior);
SetPlayerVirtualWorld(playerid,vw);
if(limba[playerid] == 0)
{
format(rogoto,sizeof(rogoto),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Adminul {FF0000}%s{FFFFFF}[ID:%d] s-a teleportat la playerul {FF0000}%s{FFFFFF}[ID:%d]!",GetName(playerid),playerid,GetName(toplayerid),toplayerid);
SendClientMessageToAll(-1,rogoto);
}
else if(limba[playerid] == 1)
{
format(enggoto,sizeof(enggoto),"{FF0000}Royal {FF8800}Stunt {00FF00}Gaming {FFFFFF}AdmCmd:Admininstrator {FF0000}%s{FFFFFF}[ID:%d] has go to player {FF0000}%s{FFFFFF}[ID:%d]!",GetName(playerid),playerid,GetName(toplayerid),toplayerid);
SendClientMessageToAll(-1,enggoto);
}
return 1;
}