- 0
Comanda /getcar si /gotocar
-
Similar Content
-
- 3 answers
- 752 views
-
- 4 replies
- 193 views
-
- 1 reply
- 144 views
-
Comanda /spec
By VAurel,
- 4 answers
- 330 views
-
- 4 answers
- 670 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
QuickSilver
Salutare,sunt incepator si as vrea putin ajutor..la comanda getcar si gotocar..deci am incercat si nu mi.a iesit sa fac un text la amandoua de exp la getcar:[Admin/Nume]a adus la el masina cu id[id/Masina] si la gotocar "[Admin/Nume] s-a teleportat la masina cu id[id/Masina] ma poate ajuta cineva??
/GETCAR
[pawn] if(strcmp(cmd, "/getcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /getcar [carid]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAgent] >= 4)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
SetVehiclePos(plo,plocx,plocy+4, plocz);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " nu esti autorizat sa folosesti aceasta comanda!");
}
}
return 1;
}[/pawn]
/GOTOCAR
[pawn] if(strcmp(cmd, "/gotocar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /gotocar [carid]");
return 1;
}
new testcar = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(PlayerInfo[playerid][pJailed] == 1)
{
SendClientMessage(playerid,COLOR_GREY," Nu poti folosi aceasta comanda daca esti la inchisoare !");
return 1;
}
new Float:cwx2,Float:cwy2,Float:cwz2;
GetVehiclePos(testcar, cwx2, cwy2, cwz2);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, cwx2, cwy2, cwz2);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, cwx2, cwy2, cwz2);
}
SendClientMessage(playerid, COLOR_GRAD1, " Te-ai teleportat la vehicul cu succes!!");
SetPlayerInterior(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nu esti autorizat sa folosesti aceasta comanda!");
}
}
return 1;
}[/pawn]
Link to comment
Share on other sites
4 answers to this question
Recommended Posts