I can /purchase everywhere - 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 can /purchase everywhere (
/showthread.php?tid=594076)
I can /purchase everywhere -
MayaEU - 13.11.2015
Hi, i can use the /purchase command everywhere, anyone know what is wrong?
pawn Код:
if(strcmp(cmd, "/purchase", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!(PlayerInfo[playerid][pDonatorLevel] == 3))
return SendClientMessage(playerid, COLOR_WHITE, " You are not a Gold VIP!");
if(!IsAtGunShop(playerid) && GetPlayerVirtualWorld(playerid) == 2)
{
SendClientMessage(playerid, COLOR_GREY, "You are not in the VIP Club/Black Market.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
ShowPlayerDialog(playerid, VIPMARKET, DIALOG_STYLE_TABLIST_HEADERS, "Gold Blackmarket",
"Weapon\tPrice\n\
Deagle\t{00BC2E}$12,000{FFFFFF}\n\
M4\t{00BC2E}$20,000{FFFFFF}\n\
Spas12\t{00BC2E}$70,000{FFFFFF}\n\
Sniper\t{00BC2E}$65,000{FFFFFF}\n\
Knife\t{00BC2E}$500,000{FFFFFF}",
"Purchase", "Cancel");
return 1;
}
}
return 1;
}
Re: I can /purchase everywhere -
Vince - 13.11.2015
PHP код:
if(!IsAtGunShop(playerid) && GetPlayerVirtualWorld(playerid) == 2)
This is vague. If you want a NAND construct it should be like so (note brackets).
PHP код:
if(!(IsAtGunShop(playerid) && GetPlayerVirtualWorld(playerid) == 2))