20.12.2013, 20:04
Hello, I would like to create a job vehicles where other people couldn't use them, I made a script and when I enter any vehicle Im knocked out from it.
HTML Code:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { new const vehicleid = GetPlayerVehicleID(playerid); if(vehicleid == pdCAR[0] || pdCAR[1] || pdCAR[2] || pdCAR[3] || pdCAR[4] || pdCAR[5] || pdCAR[6] || pdCAR[7] || pdCAR[8]| pdCAR[9] || pdCAR[10]) { if(zInfo[playerid][DarboID] != 1) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerPos(playerid,x,y,z); SendClientMessage(playerid,-1,"[{FF0066}SERVERIS{FFFFFF}] transporto priemone gali naudotis tik Las-Venturas Policijos nariai."); } else { new vardas[MAX_PLAYER_NAME]; new zinute[256]; GetPlayerName(playerid,vardas,sizeof(vardas)); format(zinute,sizeof(zinute),"[{FF0066}SERVERIS{FFFFFF}] sveikas sugryюжs б darbinж maрinа, pareigыne %s.",vardas); SendClientMessage(playerid,-1,zinute); SendClientMessage(playerid,-1,"[{FF0066}SERVERIS{FFFFFF}] darbo komandas gali suюinoti paraржs /dkomandos."); SendClientMessage(playerid,-1,"[{FF0066}SERVERIS{FFFFFF}] dirbdamas policininku tu б minutж gausi 90 LT."); SetTimer("alga",60000,true); } } } return 1; }