|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Dec 2011
Posts: 277
Reputation: 12
|
Hey,what's wrong here? The command is not working,the dialog is showing but when I select,nothing happends.
Code:
#define CONVERTING 1600
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == CONVERTING)
{
if(response)
{
if(listitem == 0)
{
if ( GetPVarInt( playerid, "Money" ) < 1000000 )
return SendClientMessage( playerid, -1, "You need 1000000$ to get 100 Coins!");
SetPVarInt(playerid, "Coins", GetPVarInt(playerid,"Coins") + 100);
SetPVarInt(playerid, "Money", GetPVarInt(playerid,"Money") - 1000000);
}
if(listitem == 1)
{
if ( GetPVarInt( playerid, "Money" ) < 1000000 )
return SendClientMessage( playerid, -1, "You need 1000000$ to get 1 Score!");
SetPVarInt(playerid, "Score", GetPVarInt(playerid,"Score") + 1);
SetPVarInt(playerid, "Money", GetPVarInt(playerid,"Money") - 1000000);
}
if(listitem == 2)
{
if ( GetPVarInt( playerid, "Coins" ) < 100 )
return SendClientMessage( playerid, -1, "You need 100 Coins to get 1000000$!");
SetPVarInt(playerid, "Money", GetPVarInt(playerid,"Money") + 1000000);
SetPVarInt(playerid, "Coins", GetPVarInt(playerid,"Coins") - 100);
}
if(listitem == 3)
{
if ( GetPVarInt( playerid, "Coins" ) < 100 )
return SendClientMessage( playerid, -1, "You need 100 Coins to get 1 Score!");
SetPVarInt(playerid, "Score", GetPVarInt(playerid,"Score") + 1);
SetPVarInt(playerid, "Coins", GetPVarInt(playerid,"Coins") - 100);
}
if(listitem == 4)
{
if ( GetPVarInt( playerid, "Score" ) < 2 )
return SendClientMessage( playerid, -1, "You need minimum 2 Score to get 1000000$!");
SetPVarInt(playerid, "Money", GetPVarInt(playerid,"Money") + 1000000);
SetPVarInt(playerid, "Score", GetPVarInt(playerid,"Score") - 1);
}
if(listitem == 5)
{
if ( GetPVarInt( playerid, "Score" ) < 2 )
return SendClientMessage( playerid, -1, "You need minimum 2 Score to get 100 Coins!");
SetPVarInt(playerid, "Coins", GetPVarInt(playerid,"Coins") + 100);
SetPVarInt(playerid, "Score", GetPVarInt(playerid,"Score") - 1);
}
}
else
{
SCM(playerid,COLOR_DGREY,"You closed.");
}
}
return 1;
}
CMD:convert( playerid, params[ ] )
{
ShowPlayerDialog(playerid, CONVERTING, DIALOG_STYLE_LIST, "Converting Money,Coins,Score.",""COLOR_LIGHTBLUE"1000000$ {FFFFFF}-> {5D66CC}100 Coins\n"COLOR_LIGHTBLUE"1000000$ {FFFFFF}-> {5D66CC}1 Score\n"COLOR_LIGHTBLUE"100 Coins {FFFFFF}-> {5D66CC}1000000$\n"COLOR_LIGHTBLUE"100 Coins {FFFFFF}-> {5D66CC}1 Score\n"COLOR_LIGHTBLUE"1 Score {FFFFFF}-> {5D66CC}1000000$\n"COLOR_LIGHTBLUE"1 Score {FFFFFF}-> {5D66CC}100 Coins","Convert","Cancel");
}
|
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2012
Location: Gurgaon,India
Posts: 743
Reputation: 137
|
pawn Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help me convert | MS:RP Mason | Scripting Help | 5 | 20/11/2011 05:59 AM |
| Help to convert | [HHT]DRON | Scripting Help | 10 | 14/11/2011 07:29 PM |
| How to convert this to FS | $$Money$$ | Scripting Help | 1 | 06/11/2011 08:04 AM |