Код:
#include <a_samp>
#define red 0xFF0000FF
new pickup;
public OnGameModeInit()
{
pickup = CreatePickup(1240, 23, 2034.1999, -1403.1999, 18.1000, -1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX, "Car","Infernus 10000 LT","Buy", "Close");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)
{
if(response)
{
if(GetPlayerMoney(playerid) > 10000)
{
SendRconCommand("newbuycar 411 1 1 10000");
}
else
{
SendClientMessage(playerid, red, "Error:You need more cash to do this.");
}
}
}
return 1;
}
/newbuycar [carid] [color1] [color2] [Price] you need to be a logged in as a rcon admin