needhelp /safedrugs and /safemats
#1

Helooo !!!

I need help !!

I want to make a safe system for gang members, this means to make a pickup in orders /put materials or drugs and /take materials or drugs, this can only be used by gang members, and when a member writes / stats to show him "safedrugs" and "safemats" and the amount that holds in the safe
Please Help me!
Respect!
Good luck!
Reply
#2

Just a example:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == 1)
    {
        if(gPlayer[playerid] != gang) return 0; // If the player isn't from the gang named "gang", nothing happens
        else return true;
    }
    return 1;
}
Reply
#3

THX Man, know to create the pickup,but i don`t know to create the command and all necessary !!!!
Give me the script command and all necessarry !!!!
Reply
#4

You can do it by many ways. One of them and most used is:
pawn Код:
new gTeam[MAX_PLAYERS];  // Top of script, for defined which team is the player from
          #define SX 1
pawn Код:
On the callback OnPlayerClassRequest
          if(classid == 0) return gPlayer[playerid]=SX;

And according commands, and classes, you can add/define the teams/restrictions

This is just a basic example. If the player choose the class ID 0 (CJ CHARACTER), his team will be the defined team "SX".
Reply
#5

Man i don`t understand...
so how do you get in that safe drugs through the command / rescue to put drugs and to show him / stats "safedrugs [ammount]
Reply
#6

pawn Код:
new DRUGS[MAX_PLAYERS]; // Script top
pawn Код:
new COUNT = 0; // Script top
pawn Код:
if(strcmp("/rescue",cmdtext,true,10) == 0)
{
   new string[128];
   DRUGS[playerid] = amount;
   format(string,sizeof(string),"%d",DRUGS);
   GameTextForPlayer(playerid, string, 5000, 5);
}
pawn Код:
new tmp[128];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp("/pickup",cmdtext,true,10) == 0)
{
  tmp = strtok(cmdtext, idx);
   new id; id = strval(tmp);
   if(!strval(tmp)) return false;
   count++ = id;
}
Edit: I dont know certain how do it...
Here's a tutorial of strtok: https://sampwiki.blast.hk/wiki/Tutorial_of_strtok

More help at: www.wiki.sa-mp.com
Reply
#7

help Me with the script .... i don`t know how make !!!
Please Help !!!
Reply
#8

nobody help me ?
Reply
#9

i need help !!!
Reply
#10

help mee pls
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)