Function doesnt work
#1

Hello, im trying to make that if a family has claimed the Dropcar point war, the members of the family will get a bonus, everytime they sells a vehicle with /dropcar.

I have made this but the function doesnt work (the dropcar turf point is number


pawn Код:
if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pFMember] < 255 && CPInfo[8][cOwned] == 1)
                {
                    GiveMoney(playerid, 1000);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Dropcar Bonus $1000!");
                }
Reply
#2

dont know it this can help

pawn Код:
public ClaimTimer(turf, gang)
{
    new string[256];
    CPInfo[turf][cGangID] = gang;
    CPInfo[turf][cOwned] = 1;
    if(gang == 5) { strmid(CPInfo[turf][cGang], "Mafia", 0, strlen("Mafia"), 255); }
    else if (gang == 6) { strmid(CPInfo[turf][cGang], "Yakuza", 0, strlen("Yakuza"), 255); }
    else if (gang == 12) { strmid(CPInfo[turf][cGang], "Hell's Rebels", 0, strlen("Hell's Rebels"), 255); }
    else if (gang == 13) { strmid(CPInfo[turf][cGang], "Street People", 0, strlen("Street People"), 255); }
    else if (gang == 14) { strmid(CPInfo[turf][cGang], "Imports", 0, strlen("Imports"), 255); }
    else if (gang == 15) { strmid(CPInfo[turf][cGang], "Ballas", 0, strlen("Ballas"), 255); }
    else if (gang == 16) { strmid(CPInfo[turf][cGang], "Aztecas", 0, strlen("Aztecas"), 255); }
    else if (gang == 17) { strmid(CPInfo[turf][cGang], "Corporation", 0, strlen("Corporation"), 255); }
    else if (gang == 18) { strmid(CPInfo[turf][cGang], "Vagos", 0, strlen("Vagos"), 255); }
    else if (gang == 19) { strmid(CPInfo[turf][cGang], "Grove Street", 0, strlen("Grove Street"), 255); }
    else if (gang > 19) { strmid(CPInfo[turf][cGang], FamilyInfo[gang-20][FamilyName], 0, strlen(FamilyInfo[gang-20][FamilyName]), 255); }
    format(string, sizeof(string), "The %s have successfully claimed %s!", CPInfo[turf][cGang], CPInfo[turf][cMessage]);
    for(new i = 1; i < 11; i++) // Reset forbid/allow status for point
    {
        cGangAllowed[turf][i] = 0;
    }
    OOCNews(COLOR_RED,string);
    OnPropUpdate();
    CPInfo[turf][cAvailable] = 0;
}
Reply
#3

if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pFMember] < 255 && CPInfo[8][cOwned] == 1)

>>

if((PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pFMember] < 255) && CPInfo[8][cOwned] == 1)

structure your queries.
Reply
#4

Quote:
Originally Posted by cSharp
Посмотреть сообщение
if(PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pFMember] < 255 && CPInfo[8][cOwned] == 1)

>>

if((PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pFMember] < 255) && CPInfo[8][cOwned] == 1)

structure your queries.
Now it will just give money to everyone who is in a family or faction, it must be the family which is claiming the turf number ( 8 )


pawn Код:
if(level >= 0 && level < 50)
            {
                new turf,cgang;
                CPInfo[turf][cGangID] = cgang;
                new rand = random(sizeof(SELLCAR1));
                format(string, sizeof(string), "You sold a car for $%s, you can sell another in 20 minutes.", Comma(SELLCAR1[rand]));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                GiveMoney(playerid, SELLCAR1[rand]);
                PlayerInfo[playerid][pCarTime] = 1200;
                if((PlayerInfo[playerid][pMember] >= 1 || PlayerInfo[playerid][pFMember] < 255) && CPInfo[8][cgang] == 1)
                {
                    GiveMoney(playerid, 1000);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Dropcar Bonus $1000!");
                }
            }
Reply
#5

Can anyone help me?
Reply
#6

Anyone?
Reply
#7

What do
PHP код:
if(PlayerInfo[playerid][pMember] >= || PlayerInfo[playerid][pFMember] < 255 && CPInfo[8][cOwned] == 1
mean?
pMember means he is in which faction?
And what about pFMember and CPInfo[8][cOwned]?
Reply
#8

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
What do
PHP код:
if(PlayerInfo[playerid][pMember] >= || PlayerInfo[playerid][pFMember] < 255 && CPInfo[8][cOwned] == 1
mean?
pMember means he is in which faction?
And what about pFMember and CPInfo[8][cOwned]?
It means if a player is in a family, and the family which he is member in, is claiming turf war number 8
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)