Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=306386)
Help -
WarToFar - 26.12.2011
Hello Can any one make it on normal msg
Its in Dailogbox i need it in normal message
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new
vehicleid = GetPlayerVehicleID(playerid),
dialog_string[128];
if(VehicleStatistics[vehicleid][vehicle_onsale] == 1)
{
format(dialog_string, sizeof(dialog_string), "Would you like to buy this %s costing $%d?", GetVehicleName(vehicleid), VehicleStatistics[vehicleid][vehicle_price]);
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Car Purchase", dialog_string, "Yes", "No");
return 1;
}
}
return 1;
}
Re: Help -
[MG]Dimi - 26.12.2011
pawn Код:
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Car Purchase", dialog_string, "Yes", "No");
into
pawn Код:
SendClientMessage(playerid,-1, dialog_string);
Just you need to determine does he want to buy car and save car id.