18.06.2012, 19:27
pawn Код:
switch(dialogid) { // We switch our dialog id's // If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
case DIALOG_ARMAS: // Our dialog!
{
switch(listitem) {
// Checking which listitem was selected
case 0: // The first item listed
{
if(GetPlayerMoney(playerid) < 7500) return SendClientMessage(playerid, VERMELHO, "[ERRO]: Vocк nгo tem grana suficiente!");
GivePlayerMoney(playerid, -7500);
GivePlayerWeapon(playerid, 30, 500);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/84367144/Thank%20You.wav");
SendClientMessage(playerid, 0xFFFFFFFF, "[INFO]Vocк Comprou Uma Ak47 Do Vendedor!");
}
case 1: // The second item listed
{
if(GetPlayerMoney(playerid) < 8500) return SendClientMessage(playerid, VERMELHO, "[ERRO]: Vocк nгo tem grana suficiente!");
GivePlayerMoney(playerid, -8500);
GivePlayerWeapon(playerid, 31, 500);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/84367144/Thank%20You.wav");
SendClientMessage(playerid, 0xFFFFFFFF, "[INFO]Vocк Comprou Uma M4A1 Do Vendedor!");
}
case 2: // The second item listed
{
if(GetPlayerMoney(playerid) < 9500) return SendClientMessage(playerid, VERMELHO, "[ERRO]: Vocк nгo tem grana suficiente!");
GivePlayerMoney(playerid, -9500);
GivePlayerWeapon(playerid, 34, 500);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/84367144/Thank%20You.wav");
SendClientMessage(playerid, 0xFFFFFFFF, "[INFO]Vocк Comprou Uma Sniper Do Vendedor!");
}
case 3: // The second item listed
{
if(GetPlayerMoney(playerid) < 5750) return SendClientMessage(playerid, VERMELHO, "[ERRO]: Vocк nгo tem grana suficiente!");
GivePlayerMoney(playerid, -5750);
GivePlayerWeapon(playerid, 24, 500);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/84367144/Thank%20You.wav");
SendClientMessage(playerid, 0xFFFFFFFF, "[INFO]Vocк Comprou Uma Deagle Do Vendedor!");
}
case 4: // The second item listed
{
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, VERMELHO, "[ERRO]: Vocк nгo tem grana suficiente!");
GivePlayerMoney(playerid, -10000);
GivePlayerWeapon(playerid, 26, 500);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/84367144/Thank%20You.wav");
SendClientMessage(playerid, 0xFFFFFFFF, "[INFO]Vocк Comprou Uma Cano Serrado Do Vendedor!");
}
}
return 1;
}