- 0
Comanda /getcar si /gotocar
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
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]
4 answers to this question
Recommended Posts