/give and /take rights to someone
#1

Can you explain me how to make in "pawno" that I can give and take rights from someone?
Like /giverights id and /takerights id, when i give someone rights, that it needs to say to him You have received "..." by me(means like player)
also when i take someone rights, he gets 0 hp so he's killed when i take someone rights, can you make me that for me because i really want this my I really don't know about that, thank you :$
Reply
#2

and yeah when someone wants to join that skin it says "you do not have a rights to join" so the leader "me or when i give someone a leader so he can give and take too rights, how do I do that and if you post a pastebin how to do that please tell me where to put, thank you :$
Reply
#3

Can anyone help pls?
Reply
#4

This can be done using MANY ways. They are:
1) Variable
2) Boolean
3) Enum

I find the 2nd or third the best, so here's some code for you.
pawn Код:
new bool: does_player_have_rights[ MAX_PLAYERS ]; //Create a boolean array for ALL players.

CMD:changerights(playerid, params[])
{
       if(sscanf(...)) // etc, etc
       {
              does_player_have_rights[ TARGET_ID ] = !does_player_have_rights[ TARGET_ID ]; // now target ID has rights opposite to those he had previously
       }
}

CMD:some_command_for_players_having_rights_only(playerid)
{
      if( does_player_have_rights[ playerid ] == false ) // or just !does_player...
      return 0; // no, he isn't allowed.
      else
      // allowed.
}
Hope you understood.
Reply
#5

thanks for posting but I don't understand, really, can you contact me on skype pls? Aleksa199771
Reply
#6

Can someone help me with this
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)