Mismatching Codes
#1

Hey Guys!

I basically scripted quite a simple variable and command system.

Its an admin command for admins to change their status from 'Available' to 'Busy' etc, However, As I was testing it, I found that when I did /as ( To Change My Status ), I also changed the others, So the variable is Global ( I can change some other admins ), I was wondering, How could I make it so each time I do /status, It only changes myne and no other admins.

If you need any pieces of code, Just reply
Reply
#2

Post the code for sure.
Reply
#3

show your /as command
Reply
#4

pawn Код:
CMD:as(playerid, params[]);
{
     if(PlayerInfo[playerid][Available] == 1)
     {
          PlayerInfo[playerid][Available] = 0;
          SendClientMessage(playerid, 0xFF0000FF, "You are now unavailable!");
     }
     else
     {
          PlayerInfo[playerid][Available] = 1;
          SendClientMessage(playerid, 0x00FF00FF, "You are now available!");
     }
     return 1;
}
Код:
PlayerInfo[playerid][Available];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)