SA-MP Forums Archive
REQUETING HELP ISSUE "BUG" - 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: REQUETING HELP ISSUE "BUG" (/showthread.php?tid=392983)



REQUETING HELP ISSUE "BUG" - Patrick - 16.11.2012

help me on my problem i have problem with has sti and security wallet i did it properly i dont know whats wrong with it. can anyone help me to make it work? source codes is
when i use command
/rob
/rape
i can still use it when they buy security wallet & anti-STI at 24/7 or supasave
need ur help!

My Definition
pawn Код:
new HasAntiSTI[MAX_PLAYERS];
new HasSecureWallet[MAX_PLAYERS];
My Variables
pawn Код:
HasAntiSTI[playerid] =0;
HasSecureWallet[playerid] =0;
The Code i used
pawn Код:
if(HasSecureWallet[playerid] > 0)
    {
      HasSecureWallet[playerid] =0;
      SendClientMessage(playerid,COLOR_ERROR,"You cant rob this person. He have security wallet.");
        return 1;
    }

    if(HasAntiSTI[playerid] > 0)
    {
      HasAntiSTI[playerid] =0;
      SendClientMessage(playerid,COLOR_ERROR,"You cannot rape this person. He have Anti-STI.");
        return 1;
    }



Re: REQUETING HELP ISSUE "BUG" - doreto - 16.11.2012

What actully is the problem


Re: REQUETING HELP ISSUE "BUG" - HyDrAtIc - 16.11.2012

pawn Код:
if(HasSecureWallet[playerid] > 1)
    {
      HasSecureWallet[playerid] =0;
      SendClientMessage(playerid,COLOR_ERROR,"You cant rob this person. He have security wallet.");
        return 1;
    }

    if(HasAntiSTI[playerid] > 1)
    {
      HasAntiSTI[playerid] =0;
      SendClientMessage(playerid,COLOR_ERROR,"You cannot rape this person. He have Anti-STI.");
        return 1;
    }



Re: REQUETING HELP ISSUE "BUG" - Abreezy - 16.11.2012

You need to do it differently.. you need to check which player is near by, then use something like pid to detect their playerid, and use [pid] into the variables, right now you are checking to player who is trying to rob to see if they have the items, not the person they are trying to rob.


Re: REQUETING HELP ISSUE "BUG" - Patrick - 16.11.2012

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
pawn Код:
if(HasSecureWallet[playerid] > 1)
    {
      HasSecureWallet[playerid] =0;
      SendClientMessage(playerid,COLOR_ERROR,"You cant rob this person. He have security wallet.");
        return 1;
    }

    if(HasAntiSTI[playerid] > 1)
    {
      HasAntiSTI[playerid] =0;
      SendClientMessage(playerid,COLOR_ERROR,"You cannot rape this person. He have Anti-STI.");
        return 1;
    }
Testing In Game


Re: REQUETING HELP ISSUE "BUG" - Abreezy - 16.11.2012

Quote:
Originally Posted by pds2012
Посмотреть сообщение
Testing In Game
that wont work.. read my post.


Re: REQUETING HELP ISSUE "BUG" - Patrick - 16.11.2012

@James Nick Not working


Re: REQUETING HELP ISSUE "BUG" - Patrick - 16.11.2012

@ Thnx Abreezy For teamveiwer + rep

Thread Closed and fixed!