26.10.2012, 23:38
na hуra q puxo alguem buga o interior ajuda ai
PHP код:
if(strcmp(cmd, "/trazer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /trazer [playerid/Parte-do-Nick]");
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] >= 1 || AdminDuty[playerid] == 1)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,0);
}
/*if(LigarAdmin[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк Presisa Estбr Ligado Como Admin");
}*/
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(plo,1);
PlayerInfo[plo][pInt] = 1;
}
if (GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
GetPlayerName(plo, giveplayer,256);
GetPlayerName(playerid, sendername,256);
format(string, sizeof(string), "[Info] Vocк teleportou %s atй vocк.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "[Info] O Administrador %s te trouxe atй ele.", sendername);
SendClientMessage(plo, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode usar esse comando// ou nгo estб com admin ligado!");
}
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}