Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=-=-=-= DINAMICNO PRAVLJENJE VOZILA BY SHOMY =-=-=-=//
- //=-= INCLUDE =-=//
- #include < a_samp >
- #include < zcmd >
- #include < sscanf2 >
- //=-= DIALOZI =-=//
- #define DIALOG_PRAVLJENJE1 1
- //=-= SKRACENICE =-=//
- #define SCM SendClientMessage
- #define SPD ShowPlayerDialog
- #define DSM DIALOG_STYLE_MSGBOX
- #define DSL DIALOG_STYLE_LIST
- #define DSI DIALOG_STYLE_INPUT
- //=-= BOJE =-=//
- #define COL_SERVER "{FF8000}"
- #define BELA "{FFFFFF}"
- //=-= PUBLIC =-=//
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_PRAVLJENJE1)
- {
- if(response)
- {
- new idvozila, bojavozila1, bojavozila2;
- if(sscanf(inputtext, "d d d", idvozila, bojavozila1, bojavozila2))
- {
- SPD(playerid, DIALOG_PRAVLJENJE1, DSI, ""COL_SERVER"ID Vozila",""BELA"Unesite ID Vozila ( Model ), pa boju vozila 1, boju vozila 2.",""BELA"Dalje",""BELA"Izlaz");
- SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Unesite ID Vozila 400-611 !");
- if(idvozila < 400 || idvozila > 611)
- {
- SPD(playerid, DIALOG_PRAVLJENJE1, DSI, ""COL_SERVER"ID Vozila",""BELA"Unesite ID Vozila ( Model ), pa boju vozila 1, boju vozila 2.",""BELA"Dalje",""BELA"Izlaz");
- SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Unesite ID Vozila 400-611 !");
- }
- }
- else
- {
- if(idvozila > 399 || idvozila < 612)
- {
- new Float:X,Float:Y,Float:Z,Float:A;
- GetPlayerPos(playerid, X,Y,Z);
- GetPlayerFacingAngle(playerid, A);
- CreateVehicle(idvozila, X,Y,Z,A, bojavozila1, bojavozila2, -1);
- }
- }
- }
- }
- return 1;
- }
- //=-= CMD =-=//
- CMD:kreirajvozilo(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- SPD(playerid, DIALOG_PRAVLJENJE1, DSI, ""COL_SERVER"ID Vozila",""BELA"Unesite ID Vozila ( Model ), pa boju vozila 1, boju vozila 2.",""BELA"Dalje",""BELA"Izlaz");
- }
- else return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Niste RCON Admin !");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment