26.03.2015, 19:27
I have just one question - how to get clicked modelid in mSelection ? For an example, if I use mSelection for car dealership system, and if player click on Infernus, to take 75k from him.
public OnPlayerModelSelection(playerid, response, listid, modelid)
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if(listid == skinlist)
{
if(response)
{
// here you code what will happend when clicked something in that list.
}
else SendClientMessage(playerid, COLOR_WHITE, "Canceled skin selection");
return 1;
}
return 1;
}
You mean that when you open specific list from mSelection and click something which function will it triger?
You are looking for pawn Код:
pawn Код:
|
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if(listid == ograde || listid == ostalo || listid == stolstolice)
{
if(response)
{
new str[128];
format(str, sizeof(str), ""KUCE"Are you sure that you want to buy this object for "WHITE"$%d ?", PriceList[modelid][1]);
ShowPlayerDialog(playerid, DIALOG_FURNITUREB, DIALOG_STYLE_MSGBOX, "House - exterior", str, "Okay", "Close");
}
}
return 1;
}
if(modelid == 280) // If the modelid was 280 (LSPD skin)
{
GivePlayerMoney(playerid, - 500); // Removes 500 money from the player
}