i have a question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: i have a question (
/showthread.php?tid=486082)
i have a question -
Antoniohl - 07.01.2014
im confused, i have tried so many times about Creating a dialog, it works perfect but the problem is
Код:
if(listitem==1) // ARMOUR 1000$
{
if(PlayerInfo[playerid][pDonateRank] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not Bronze VIP !");
return 1;
}
if(PlayerInfo[playerid][pDonateRank] > 0)
{
PlayerInfo[playerid][pCash] -= 1000;
GivePlayerMoney(playerid,-1000);
SetPlayerArmour(playerid,100.0);
return 1;
}
}
}
}
actually i was about to add another thing, for example "if he's > 1
it sells the gun for him for 75perfect off i have made it like that
Код:
if(PlayerInfo[playerid][pDonateRank] > 2)
{
PlayerInfo[playerid][pcash] -= 750;
GivePlayerWeapon(playerid,34,99999)
return 1;
}
i was trying to edit it, sometimes gives me the same gun and it Took money from me twice, and sometimes it doesn't work, i don't know what to do, can you help me?
Re: i have a question -
Voxel - 07.01.2014
Dat intendation doe o-o anyway lets see if I understand what you mean.. you want these 3 donater ranks to each get something else depending on their rank, well simply change ">" to "==".
pawn Код:
if(PlayerInfo[playerid][pDonateRank] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "You are not Bronze VIP !");
return 1;
}
if(PlayerInfo[playerid][pDonateRank] == 1)
{
PlayerInfo[playerid][pCash] -= 1000;
GivePlayerMoney(playerid,-1000);
SetPlayerArmour(playerid,100.0);
return 1;
}
if(PlayerInfo[playerid][pDonateRank] == 2)
{
PlayerInfo[playerid][pcash] -= 750;
GivePlayerWeapon(playerid,34,99999)
return 1;
}
If you want to check if the player is higher and the level you want simply put:
pawn Код:
if(PlayerInfo[playerid][pDonateRank] >= 2) //> means larger then and = means equal to so this means
//if the player has a donater rank larger then and/or equal to 2 it will run this code.
Hope this helped and good luck!