SA-MP Forums Archive
House payday - 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: House payday (/showthread.php?tid=617466)



House payday - StR_MaRy - 21.09.2016

hey guys i have a sistem on every payday if you own house 1 / 2 / 3 you get a message but i don't own a house and i did get the message , what is wrong with this code?

Код HTML:
if(IsAGangMember(i)) return SendClientMessage(i, COLOR_ERROR, "(!) {FFFFFF}Deti o casa langa un HQ nu platesti nici o taxa deoarece esti membru Gang/Mafie");
			{
				if(house != 1 || house != 2 || house != 3)
				{
					GivePlayerCash(i, -100);
					format(gString, sizeof(gString), "(!) {FFFFFF}Protection Fee: You have a house next to a {00F2FF}Los Aztecas {FFFFFF}HQ, you payed 100{00FF00}$ {FFFFFF}for protection.");
					SendClientMessage(i, COLOR_SYN2, gString);
					format(gString, sizeof(gString), "(!) {00F2FF}Los Aztecas Member: {FFFFFF}Say thanks, we could beat you and rape your wife, but we accept money to.");
					SendClientMessage(i, COLOR_SYN2, gString);
				}
			}



Re: House payday - oMa37 - 21.09.2016

Try this, You had an extra brackets.

PHP код:
if(IsAGangMember(i)) return SendClientMessage(iCOLOR_ERROR"(!) {FFFFFF}Deti o casa langa un HQ nu platesti nici o taxa deoarece esti membru Gang/Mafie");

                if(
house != || house != || house != 3)
                {
                    
GivePlayerCash(i, -100);
                    
format(gStringsizeof(gString), "(!) {FFFFFF}Protection Fee: You have a house next to a {00F2FF}Los Aztecas {FFFFFF}HQ, you payed 100{00FF00}$ {FFFFFF}for protection.");
                    
SendClientMessage(iCOLOR_SYN2gString);
                    
format(gStringsizeof(gString), "(!) {00F2FF}Los Aztecas Member: {FFFFFF}Say thanks, we could beat you and rape your wife, but we accept money to.");
                    
SendClientMessage(iCOLOR_SYN2gString);
                } 



Re: House payday - Luis- - 21.09.2016

I'm guessing the "house" variable is for each player? If so, then you need to change the
Код:
new house;
to
Код:
new house[MAX_PLAYERS];
then do this
Код:
if(IsAGangMember(i)) return SendClientMessage(i, COLOR_ERROR, "(!) {FFFFFF}Deti o casa langa un HQ nu platesti nici o taxa deoarece esti membru Gang/Mafie");
			{
				if(house[i] != 1 || house[i] != 2 || house[i] != 3)
				{
					GivePlayerCash(i, -100);
					format(gString, sizeof(gString), "(!) {FFFFFF}Protection Fee: You have a house next to a {00F2FF}Los Aztecas {FFFFFF}HQ, you payed 100{00FF00}$ {FFFFFF}for protection.");
					SendClientMessage(i, COLOR_SYN2, gString);
					format(gString, sizeof(gString), "(!) {00F2FF}Los Aztecas Member: {FFFFFF}Say thanks, we could beat you and rape your wife, but we accept money to.");
					SendClientMessage(i, COLOR_SYN2, gString);
				}
			}



Re: House payday - StR_MaRy - 21.09.2016

that bracket is to see if you own a house as a gang member 1 of those 3 if i remove those brackets is still saying that ?