Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- new Text3D:avozila[MAX_PLAYERS];
- new AdminVozilo[MAX_PLAYERS];
- new vozilolist = mS_INVALID_LISTID;
- new avehvozilo;
- //
- Pod OnPlayerConnect
- AdminVozilo[playerid] = -1;
- //
- Pod OnPlayerDisconnect
- if(AdminVozilo[playerid] != -1)
- {
- g_DestroyVehicle_g(AdminVozilo[playerid]);
- AdminVozilo[playerid] = -1;
- }
- //
- Pod OnPlayerSpawn
- if(AdminVozilo[playerid] != -1)
- {
- g_DestroyVehicle_g(AdminVozilo[playerid]);
- AdminVozilo[playerid] = -1;
- }
- //
- pod public OnPlayerModelSelection(playerid, response, listid, modelid)
- {
- if(listid == vozilolist)
- {
- if(response)
- {
- new Float:POs[4], string[90];
- GetPlayerPos(playerid, POs[0], POs[1], POs[2]);
- Info(playerid,"Spawnali ste A/GM Vozilo.");
- avehvozilo = g_CreateVehicle_g(modelid, POs[0], POs[1], POs[2], POs[3], 0, 0,999);
- g_PutPlayerInVehicle_g(playerid, avehvozilo, 0);
- AdminVozilo[playerid] = avehvozilo;
- format(string,sizeof(string),""SIVA"[ STAFF VOZILO - %s ]", GetName(playerid));
- Attach3DTextLabelToVehicle(avozila[playerid], model, 0.0, 0.0, 0.0);
- Update3DTextLabelText(avozila[playerid], avehvozilo, string);
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
- g_SetVehicleHealth_g(GetPlayerVehicleID(playerid), 999);
- }
- else Info(playerid,"Odustali ste od spawnanja Admin/GameMaster Vozila");
- return 1;
- }
- return 1;
- }
- //
- komanda YCMD:aveh(playerid, params[],help)
- {
- #pragma unused help
- if(UlogovanProvera[playerid] == 0) return Error(playerid,"Moras se ulogovati da bi koristio ovu komandu!");
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- if(PlayerInfo[playerid][pGM] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(AdminVozilo[playerid] != -1)
- {
- DestroyVehicle(AdminVozilo[playerid]);
- AdminVozilo[playerid] = -1;
- return Info(playerid,"Unistili ste Admin & GameMaster Vozilo.");
- }
- else if(AdminVozilo[playerid] == -1)
- {
- ShowModelSelectionMenu(playerid, vozilolist, "Admin Vozila");
- }
- }
- else return Error(playerid,"Nisi ovlascen!");
- return 1;
- }
- //
Advertisement
Add Comment
Please, Sign In to add comment