11.03.2013, 17:32
pawn Код:
if( dialogid == Dialog_BuyLicense )
{
if( response )//daca apasa primul buton
{
if(listitem == 0 ) //Fishin
{
if(PlayerInfo[playerid][pFishLic] == 0)
{
if(GetPlayerCash(playerid) >= 20000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a fishing license for 20000Lei !");
GivePlayerCash(playerid, - 20000);
PlayerInfo[playerid][pFishLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 20000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a fishing license !");
}
return 1;
}
if(listitem == 1 ) //Weapon
{
if(PlayerInfo[playerid][pGunLic] == 0)
{
if(GetPlayerCash(playerid) >= 60000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a weapon license for 60000Lei !");
GivePlayerCash(playerid, - 200);
PlayerInfo[playerid][pGunLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 60000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a weapon license !");
}
return 1;
}
if(listitem == 2 ) //Sailing
{
if(PlayerInfo[playerid][pBoatLic] == 0)
{
if(GetPlayerCash(playerid) >= 30000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a sailing license for 30000Lei !");
GivePlayerCash(playerid,-30000);
PlayerInfo[playerid][pBoatLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 30000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a sailing license !");
}
return 1;
}
if(listitem == 3 ) //Flying
{
if(PlayerInfo[playerid][pFlyLic] == 0)
{
if(GetPlayerCash(playerid) >= 50000)
{
SendClientMessage(playerid, COLOR_GREY, "* You bought a flying license for 50000Lei !");
GivePlayerCash(playerid, - 50000);
PlayerInfo[playerid][pFlyLic] = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have 50000Lei !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You already have a flying license !");
}
return 1;
}
}
}