Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/veh", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] < 6)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Nisi u mogucnosti koristiti ovu komandu!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /veh [carid] [color1] [color2]");
- return 1;
- }
- new car;
- car = strval(tmp);
- if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vozila nemogu ici ispod 400 ili iznad 611 !"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /veh [carid] [color1] [color2]");
- return 1;
- }
- new color1;
- color1 = strval(tmp);
- if(color1 < -1 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Boja nemoze biti ispod 0 ili iznad 126 !"); return 1; }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /veh [carid] [color1] [color2]");
- return 1;
- }
- if(car == 520) Hydras ++;
- if(car == 425) Hunters ++;
- if(car == 430) Predators ++;
- if(car == 432) Rhinos ++;
- new color2;
- color2 = strval(tmp);
- if(color2 < -1 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Boja nemoze biti ispod 0 ili iznad 126 !"); return 1; }
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- new carid = CreateVehicle(car, X,Y+5,Z+1, 0.0, color1, color2, 60000);
- LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
- format(string, sizeof(string), "** Vozilo %d spawnano.", carid);
- SendClientMessage(playerid, COLOR_GREY, string);
- new housename[24]; GetVehicleName(carid, housename, sizeof(housename));
- new area[24]; GetPlayer2DZone(playerid, area, sizeof(area));
- format(string,sizeof(string), "[ADMIN]: %s je spawnao %s (%d) [%d] na svojoj poziciji (%s).",sendername,housename,car,carid,area);
- ABroadCast(COLOR_LIGHTRED, string, 5);
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Spawned a %s (%d) [%d] (Color 1: %d | Color 2: %d) At His Position.",d,m,y,h,mi,s,sendername,housename,car,carid,color1,color2);
- AdminLog(string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement