Jump to content

Restrictie masini la o factiune!


NeKeRm@N

Recommended Posts

Acest tutorial consta in punerea masinilor pentru factiune:

1.Intram in masini si tastam /oldcar

- cand tastati /oldcar apare un cod(acel cod scrietil pe o foaie)

- asa faceti pana terminati cu toate masinile

2.Dati search[CTRL+F] la:

if(newstate == PLAYER_STATE_DRIVER)
3.Dupa ce ati dat search, sub linia de mai sus, adaugati asta:
		if(newcar == A || newcar == B || newcar == 168 || newcar == C)
		{
		    if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2) { }
		    else {
	        SendClientMessage(playerid, COLOR_GREY,"Your text here !");}
                RemovePlayerFromVehicle(playerid);
		}
Sa va explic mai bine: - newcar == A(in loc de A puneti codul despre care vam explicat sa'l scrieti pe o foaie) -asa faceti si la celelalte in loc de B,C,D scrieti codul depinde cate masini aveti la factiune(eu de exemplu pentru o factiune 4 masini sunt maxim)
if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
numarul 12 este numarul factiunii - in loc de "You are not a crips member!" puteti pune orice text doriti Deci va fi:
if(newcar == 170 || newcar == 169 || newcar == 168 || newcar == 167)
        {
                if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
                         {
                                 SendClientMessage(playerid, COLOR_GREY, "Your TEXT Here!");
                                 RemovePlayerFromVehicle(playerid);
                         }
        }

Sper ca ati inteles !

Am facut acest mic tutorial, pentru ca am vazut in topicuri probleme legate de acest tutorial.

Bafta !

Link to comment
Share on other sites

if(newcar == 170 || newcar == 169 || newcar == 168 || newcar == 167)
        {
                if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
                         {
                                 SendClientMessage(playerid, COLOR_GREY, "Your TEXT Here!");
                                 RemovePlayerFromVehicle(playerid);
                         }
        }
E total gresit din cate vad , codul asta te scoate din masina daca ESTI membru / lider a factiunii 12 , daca intri in masinile cu id 170 , 169 , 168 , 167 si NU te scoate daca esti membri al oricarei factiuni inafara de 12. Normal ar fi:
		if(newcar == 170 || newcar == 169 || newcar == 168 || newcar == 167)
		{
		    if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2) { }
		    else {
	        SendClientMessage(playerid, COLOR_GREY,"Your text here !");}
                RemovePlayerFromVehicle(playerid);
		}

Ai uitat de acel else

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.