Jomes. Posted October 12, 2014 Report Share Posted October 12, 2014 Descriere tutorial: Daca sunt civil si ma duc sa dau f la o masina de la police departament sa nu ma mai bage in ea, sa fie inchisa pentru civili si deschisa pentru membru. Link to comment Share on other sites More sharing options...
Mark S. Posted October 12, 2014 Report Share Posted October 12, 2014 Salut pune la public OnPlayerStateChange(playerid, newstate, oldstate) if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)// 411 reprezinta infernusul tu pui masinile care le ai la factiune { if(PlayerInfo[playerid][pMember] != 20 && PlayerInfo[playerid][pLeader] != 20 && PlayerInfo[playerid][pAdminDuty] != 1) // != 20 reprezinta idul factiunii { if (newstate == PLAYER_STATE_DRIVER) // aici verifica daca e sofer si il da jos din masina daca nu e membru la factiunea 20 { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0xFF4444FF, "Nu faci parte din L.S.P.D."); } } else if(PlayerInfo[playerid][pMember] == 20 && PlayerInfo[playerid][pLeader] == 20 && PlayerInfo[playerid][pAdminDuty] == 1) { if (newstate == PLAYER_STATE_DRIVER) // verifica daca playerul a intrat in masina ca sofer. { } } return 1; } Si tot asa pentru fiecare masina! http://wiki.sa-mp.com/wiki/Vehicle_Model_ID_List lista masinilor Bafta Link to comment Share on other sites More sharing options...
Jomes. Posted October 12, 2014 Author Report Share Posted October 12, 2014 Cred ca nu ai inteles. Daca nu sunt membru masina sa fie inchisa, dar daca sunt sa fie deschisa. Cand un civil se duce la o masina de la factiune si da f sa nu poata sa se urce in ea si sa-i apara un mesaj specific. Link to comment Share on other sites More sharing options...
Mark S. Posted October 12, 2014 Report Share Posted October 12, 2014 da asa si este { if (newstate == PLAYER_STATE_DRIVER) // aici verifica daca e sofer si il da jos din masina daca nu e membru la factiunea 20 { RemovePlayerFromVehicle(playerid); Acesta linie inseamna ca nu il lasa sa urce in masina SendClientMessage(playerid, 0xFF4444FF, "Nu faci parte din L.S.P.D."); } } Link to comment Share on other sites More sharing options...
Jomes. Posted October 13, 2014 Author Report Share Posted October 13, 2014 Nu vreau sa-l dea jos din masina. Vreau ca masina respectiva sa fie inchisa, sa nu se urce in ea. Link to comment Share on other sites More sharing options...
Gireada Posted October 13, 2014 Report Share Posted October 13, 2014 http://wiki.sa-mp.com/wiki/SetVehicleParamsEx Link to comment Share on other sites More sharing options...
Recommended Posts