25.04.2012, 21:39
pawn Код:
dcmd_repair(playerid, params[])
{
#pragma unused params
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW,"You must be inside vehicle to use this command!");
if(IsPlayerInRangeOfPoint(playerid, Put your coords here)) // 'Ok so the player is in range, now what?'
{
if(GetPlayerMoney(playerid > 100) // 'Ok so if they have over $100, I will allow them to repair their vehicle'
{
RepairVehicle(GetPlayerVehicleID(playerid)); // 'repair'
SendClientMessage(playerid,0xFFFF00AA,"Server: Your Vehicle Has Been Repaired!"); // ' I will let them know '
}
else return SendClientMessage(playerid,-1, "You do not have $100 to repair your vehicle!"); // ' They don't have $100 so I have to tell them they do not have it. '
}
return 1;
}