12.02.2011, 16:31
Initially is this one:
But now i have this one changed by you (Clive).
pawn Код:
if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Dica: /goto [playerid]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SafeSetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
else
{
SafeSetPlayerInterior(playerid,0);
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SafeSetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(playerid, PlayerInfo[plo][pVirWorld]);
GetPlayerName(plo, giveplayer, sizeof(giveplayer));
//format(string, sizeof(string), "%s teleportou-se para %s", sendername, giveplayer);
GameTextForPlayer("~y~Um Admin teleportou-se para ti, ~y~ Imobiliza o teu veнculo!",7500,3);
DisablePlayerCheckpoint(playerid);
OnPlayerExitFood(playerid);
if(BizzEntered[plo] != 9999)
{
BizzEntered[playerid] = BizzEntered[plo];
}
TelesLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo estбs autorizado a usar este comando!");
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d nгo й um jogador vбlido.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Dica: /goto [playerid]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new giveplayer2[MAX_PLAYER_NAME];
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SafeSetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
else
{
SafeSetPlayerInterior(playerid,0);
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SafeSetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SetPlayerVirtualWorld(playerid, PlayerInfo[plo][pVirWorld]);
GetPlayerName(plo, giveplayer2, sizeof(giveplayer2));
//format(string, sizeof(string), "%s teleportou-se para %s", sendername, giveplayer2);
GameTextForPlayer("~y~Um Admin teleportou-se para ti, ~y~ Imobiliza o teu veнculo!",7500,3);
DisablePlayerCheckpoint(playerid);
OnPlayerExitFood(playerid);
if(BizzEntered[plo] != 9999)
{
BizzEntered[playerid] = BizzEntered[plo];
}
TelesLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo estбs autorizado a usar este comando!");
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d nгo й um jogador vбlido.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
}
return 1;
}