Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://forum.sa-mp.com/showthread.php?t=270508 <-- Maths include again
- command(countcar, playerid, params[])
- {
- new count, string[16], id;
- if(sscanf(params, "i", id)) return SendClientMessage(playerid, Grey, "Usage: /countcar [Car ID]");
- {
- for(new i = 0; i < MAX_VEHICLES; i ++)
- {
- count = MPGetVehicleOccupantCnt(i);
- format(string, sizeof(string), "%i", count);
- SendClientMessage(playerid, -1, string);
- }
- }
- return 1;
- }
- command(tow, playerid, params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid))) = 525
- {
- if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))
- {
- AttachTrailerToVehicle(GetPlayerVehicleID(playerid), GetPlayerVehicleID(playerid));
- }
- else {
- SendClientMessage(playerid, Grey, "You are already towing a Vehicle.");
- }
- }
- else {
- SendClientMessage(playerid, Grey, "You are not in a Tow Truck");
- }
- }
- else {
- SendClientMessage(playerid, Grey, "You need to be in a Tow Truck.");
- }
- return 1;
- }
- command(detach, playerid, params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid))) = 525
- {
- if(IsTrailerAttachedToVehicle(GetPlayerVehicleID))
- {
- DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
- }
- else {
- SendClientMessage(playerid, Grey, "There is no Vehicle to detach.")
- }
- }
- else {
- SendClientMessage(playerid, Grey, "You are not in a Tow Truck.")
- }
- }
- else {
- SendClientMessage(playerid, Grey, "You need to be in a Tow Truck.")
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement