Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd,"/spawncar", true)== 0)
- {
- new Float:vx, Float:vy, Float:vz, vid;
- tmp = strtok(cmdtext, idx);
- if (!strlen(tmp)) return SendClientMessage(playerid, 0x00D90044, "Usa: /spawncar [vehicleid/nome]");
- if (IsNumeric(tmp) == 1)
- {
- vid = strval(tmp);
- }else{
- vid = GetVehicleIDFromName(tmp);
- }
- if ((vid < 400) || (vid > 611) || (vid == 590) || (vid == 569) || (vid == 570) || (vid == 537) || (vid == 538) || (vid == 449))
- {
- return SendClientMessage(playerid, 0x00D90044, "Veicolo non riconosciuto.");
- }
- else
- {
- GetPlayerPos(playerid, vx, vy, vz);
- CreateVehicle(vid, vx + random(9) - 4, vy + random(9) - 4, vz, 0, -1, -1, -1);
- new car = GetPlayerVehicleID(playerid);
- format(stringa,sizeof(stringa),"{FF0A00}T{FFFFFF}F{00FF1E}S{FFFFFF} %d",random(999));
- SetVehicleNumberPlate(car, stringa);
- GetVehicleModel(vid);
- GetPlayerName(playerid, nome, sizeof(nome));
- format(stringa, sizeof(stringa), "{00FF00}%s {FFFFFF}ha spawnato un {FF0000}%s", nome, VehicleName[vid - 400]);
- SendClientMessageToAll(-1, stringa);
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment