Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:car(playerid, params[])
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "You already have a car");
- new modelid, color1, color2;
- if(sscanf(params, "iiI(-1)")) return SendClientMessage(playerid, COLOR_ORANGE, "System: /car [id] [color1] [color2]");
- if(color2 == -1) color2 = color1;
- if(modelid > 611 || modelid < 400) return SendClientMessage(playerid, COLOR_ORANGE, "Wrong car id");
- if(CreateCar[playerid] != 0) DestroyVehicle(CreateCar[playerid]);
- new Float:pos[4];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- CreateCar[playerid] = CreateVehicle(modelid, pos[0], pos[1], pos[2], pos[3], color1, color2, 50000); // 50,000 seconds? It might as well be -1... Do you mean 50 seconds?
- //SetVehicleNumberPlate(CreateCar[playerid], tmp4); // There's no parameter for this...
- //SetVehicleToRespawn(CreateCar[playerid]); // Why would you want to respawn it..?
- PutPlayerInVehicle(playerid, CreateCar[playerid], 0);
- SetVehicleVirtualWorld(CreateCar[playerid], GetPlayerVirtualWorld(playerid));
- foreach(new i : Player)
- {
- if(i == playerid) continue;
- SetVehicleParamsForPlayer(CreateCar[playerid], i, 0, true);
- }
- //new
- //string[144];
- //format(string, sizeof string, " %s SPAWNED SUCCESFUL", VehicleNames[modelid-400]);
- //SendClientMessage(playerid, COLOR_BLUE, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment