22.03.2011, 18:38
Thanks,
I found the define
LICMENU DIALOG
here is the command
wont work the dialog is messed up
what was the 1337 for anyway?
I found the define
Код:
#define LICMENU 9010
Код:
if(dialogid == LICMENU) { if(response) { if(listitem == 0) { if(PlayerInfo[playerid][pCash] > 149) { GivePlayerMoney(playerid, -150); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-150; PlayerInfo[playerid][pCarLic] = 1; SendClientMessage(playerid, COLOR_WHITE, " You bought a drivers license for $150"); } if(listitem == 1) { if(PlayerInfo[playerid][pCash] > 999) { GivePlayerMoney(playerid, -1000); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-1000; PlayerInfo[playerid][pFlyLic] = 1; SendClientMessage(playerid, COLOR_WHITE, " You bought a flying license for $1000"); } if(listitem == 2) { if(PlayerInfo[playerid][pCash] > 199) { GivePlayerMoney(playerid, -200); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-200; PlayerInfo[playerid][pBoatLic] = 1; SendClientMessage(playerid, COLOR_WHITE, " You bought a boat license for $200"); } if(listitem == 3) { if(PlayerInfo[playerid][pCash] > 249) { GivePlayerMoney(playerid, -250); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-250; SendClientMessage(playerid, COLOR_WHITE, " You bought a fishing license for $250"); PlayerInfo[playerid][pFishLic] = 1; return 1; } } } } } } } }
here is the command
Код:
if(strcmp(cmd, "/buylic", true) == 0) { if(IsPlayerInRangeOfPoint(playerid,3.0,1490.2982,1305.6770,1093.2963)) { ShowPlayerDialog(playerid, LICMENU, DIALOG_STYLE_LIST, "Buy License","Drivers License[$150]\nFly License[$1000]\nBoat License[$200]\nFishing License[$250]","Buy","Close"); } else { SendClientMessage(playerid, COLOR_WHITE, " Server: Not at the DMV"); return 1; } }
what was the 1337 for anyway?