[Question]Plate
#10

Quote:
Originally Posted by Gabb0411
Посмотреть сообщение
Something like this ?
Код:
cmd(carplate, playerid, params[])
{
	#pragma unused params
	new string[256], car = PlayerInfo[playerid][pPcarkey], plate[32], playername[MAX_PLAYER_NAME], hexcolor; GetPlayerName(playerid, playername, sizeof(playername));
 	if(car == 999) { SendClientMessage(playerid, COLOR_GRAD5, "You don't own a car !"); return 1; }
 	if(sscanf(params, "hs", hexcolor, plate)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /carplate [carnumber] (Max 10 characters).");
 	else {
 		if(car != 999 && strcmp(playername, CarInfo[car][cOwner], true) == 0) {
   			new payout = strlen(plate) * 10000;
   			if(GetPlayerMoney(playerid) < payout) { format(string, sizeof(string), "You don't have %d$ to pay the plate number.", payout); SendClientMessage(playerid, COLOR_WHITE, string); return 1; }
			SetVehicleNumberPlate(car, plate); GivePlayerMoney(playerid, -payout);
			CarInfo[car][cPlate] = plate;
			format(string, sizeof(string), "Your plate cost %d$ and you will see after next car respawn (%s).", payout, plate); SendClientMessage(playerid, COLOR_LIGHTBLUE3, string); OnPropUpdate();
		}
	}
	return 1;
}
It doesn't work.
You didn't respawned the car?
Reply


Messages In This Thread
[Question]Plate - by Gabb0411 - 05.12.2010, 11:43
Re: [Question]Plate - by DVDK - 05.12.2010, 11:45
Re: [Question]Plate - by Gabb0411 - 06.12.2010, 16:36
Re: [Question]Plate - by Luis- - 06.12.2010, 16:37
Re: [Question]Plate - by Gabb0411 - 06.12.2010, 18:02
Re: [Question]Plate - by Gabb0411 - 09.12.2010, 12:48
Re: [Question]Plate - by Rac3r - 09.12.2010, 13:59
Re: [Question]Plate - by leong124 - 09.12.2010, 14:44
Re: [Question]Plate - by Gabb0411 - 09.12.2010, 15:56
Re: [Question]Plate - by DVDK - 09.12.2010, 16:57

Forum Jump:


Users browsing this thread: 1 Guest(s)