House payday
#1

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);
				}
			}
Reply
#2

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);
                } 
Reply
#3

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);
				}
			}
Reply
#4

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 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)