REQUETING HELP ISSUE "BUG"
#1

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

What actully is the problem
Reply
#3

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

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.
Reply
#5

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
Reply
#6

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

@James Nick Not working
Reply
#8

@ Thnx Abreezy For teamveiwer + rep

Thread Closed and fixed!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)