Jump to content
  • 0

Intrebare Masina personala


Shooter

Question

Salut , am creeat niste masini personale ( nu cu /v , din gm doar pt anumiti playeri )

Intrebarea mea este : cand un player (nu propietarul vehiculului) intra in masina personala ii spune ca nu este a lui si il pune sus pe masina

Cum as putea sa fac atunci cand da enter sa ii scrie Acesta este vehicului lui x si  sa nu il lase sa intre deloc  sau cel putin sa poata intra sa ii spuna ca nu este a lui masina dar sa nu il mai puna pe ea sa il puna pe pamant

Scriptul

if(newcar == x)

{

new sendername[MAX_PLAYER_NAME];

GetPlayerName(playerid, sendername, sizeof(sendername));

if(strcmp(sendername,"x",true))

{

SendClientMessage(playerid,COLOR_GREY," Acesta este vehiculul lui x !");

RemovePlayerFromVehicle(playerid);

                RemovePlayerFromVehicle(playerid);

                new Float:bx, Float:by, Float:bz;

                GetPlayerPos(playerid, bx, by, bz);

                SetPlayerPos(playerid, bx, by, bz);

}

}

// x

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

[pawn] if(newcar == x)

{

new sendername[MAX_PLAYER_NAME];

GetPlayerName(playerid, sendername, sizeof(sendername));

if(strcmp(sendername,"x",true))

{

SendClientMessage(playerid,COLOR_GREY," Acesta este vehiculul lui x !");

SendClientMessage(playerid,COLOR_GREY," Aceasta nu este masina ta!!!");

RemovePlayerFromVehicle(playerid);

                RemovePlayerFromVehicle(playerid);

                new Float:bx, Float:by, Float:bz;

                GetPlayerPos(playerid, bx, by, bz);

                SetPlayerPos(playerid, bx, by, bz);

}

}

// x[/pawn]

Daca ai sistem /engine , nu o poate porni. Playerul nu poate face nimic atat cat este functia RemovePlayerFromVehicle , nu o poate fura.

[email protected] - Orice mapa doriti , add me !

Link to comment
Share on other sites

if(newcar == x)
{
        new sendername[MAX_PLAYER_NAME],Float:cx, Float:cy, Float:cz;
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(strcmp(sendername,"x",true) == 0 &&  !ispassenger)
        {
                    SendClientMessage(playerid,-1,"Masina ta, X");
        } else {
                    GetPlayerPos(playerid, cx, cy, cz);
	      SetPlayerPos(playerid, cx,  cy, cz);
        }
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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.