Cannot buy - 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: Cannot buy (
/showthread.php?tid=412824)
Cannot buy -
Louris - 03.02.2013
How to make that if someone buy gang zone, when another players try to buy this zone they can't? Simple:
I bought gang zone with cmd /buy
Another player try to buy my zone, but he can't.
AW: Cannot buy -
Louris - 03.02.2013
Any ideas?
Re: Cannot buy -
Gamer_Z - 03.02.2013
Hello World!
AW: Re: Cannot buy -
Louris - 03.02.2013
Quote:
Originally Posted by Gamer_Z
|
Hahaha, very funny. I need example, next time I will know how to do this.
Re: Cannot buy -
SomeRandomGuy123 - 03.02.2013
Maybe he can't buy your zone, BECAUSE you already own the zone?
Would be easier with the code IMO to see what you're trying to do.
AW: Cannot buy -
Louris - 03.02.2013
SomeRandomGuy you don't understand. I need when someone already own zone, another players cannot buy this zone.
Re: AW: Cannot buy -
Gamer_Z - 03.02.2013
Quote:
Originally Posted by Louris
SomeRandomGuy you don't understand. I need when someone already own zone, another players cannot buy this zone.
|
you can do that with variables, enumerators and if/case/else/etc.. statements
Re: Cannot buy -
SKAzini - 03.02.2013
pawn Код:
if(SomeoneOwnsZone) return SendClientMessage(playerid, -1, "Someone already owns this zone");
Quote:
Originally Posted by SomeRandomGuy123
Would be easier with the code IMO to see what you're trying to do.
|
^What he said
AW: Cannot buy -
Louris - 03.02.2013
Code is very simple.
Код:
CMD:pp(playerid, params[])
{
ShowPlayerDialog(playerid,1919, DIALOG_STYLE_LIST, "Parkiniu mafijos pirkimas.", "Pirkti\nInformacija", "Pasirinkti", "Iљeiti");
return 1;
}
if(dialogid == 1919)
{
if(response)
{
if(listitem == 0)
{
if(PlayerInfo[playerid][pKreditai] < 100){SendClientMessage(playerid, 0xFF000090, "Tu neturi tiek kreditų!"); return 1;}
PlayerInfo[playerid][pKreditai] -=100;
SendClientMessage(playerid, 0xFF000090, "Nusipirkote mafiją!");
PlayerInfo[playerid][pPgaujosvadas] = true; // This code set gang owner
if(listitem == 1)
{
ShowPlayerDialog(playerid,10101,DIALOG_STYLE_MSGBOX,"Parkiniu mafijos pirkimas","Mafijos kaina: 100 kreditų.\n Mafija galioja visą laiką, tačiau jeigu būsite neaktyvus, prarasite mafiją!","Gerai","");
}
}
}
AW: Cannot buy -
Louris - 03.02.2013
any ideas?