- 0
[PROBLEMA] ~ GorkemRO
-
Similar Content
-
- 1 reply
- 82 views
-
- 2 answers
- 904 views
-
Problema turf
By Soryn.,
- 3 answers
- 457 views
-
- 0 replies
- 194 views
-
- 2 replies
- 382 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
GorkemRO
Salut sa-mp.ro ! Am si eu o problema .. Am incercat sa editez comanda /goto .. si nu prea mi-a mers ..
Am vrut sa fac asa " Ai fost teleportat la playerul %s " .
Uitati comanda . [pawn]if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "CMD: /goto [playerid/PartOfName]");
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 || PlayerInfo[playerid][pHelper] >= 1)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0 || GetPlayerInterior(plo) > 0)
{
SetPlayerInterior(playerid,GetPlayerInterior(plo));
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
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
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
format(string, sizeof(string), " Ai fost teleportat la playerul %s.", giveplayer);
SendClientMessage(playerid, 0xA8A8FFFF, string);
SetPlayerInterior(playerid,GetPlayerInterior(plo));
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
PlayerInfo[playerid][pInt] = GetPlayerInterior(plo);
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));
HouseEntered[playerid] = HouseEntered[plo];
}
else
{
SendClientMessage(playerid, COLOR_1RED, "Nu ai acces la aceasta comanda ");
}
}
}
else
{
format(string, sizeof(string), " That player is not connected.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}[/pawn]
Cu toti stiti ca trebuie sa dau /goto [nume/id] ! Si din pacate cand dau /goto ma da la Burger Shot si imi arata " Ai fost teleportat la OS! " niste bazaconii
Link to comment
Share on other sites
11 answers to this question
Recommended Posts