Mismatching Codes - 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: Mismatching Codes (
/showthread.php?tid=499757)
Mismatching Codes -
McBan - 09.03.2014
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
Re: Mismatching Codes -
]Rafaellos[ - 09.03.2014
Post the code for sure.
Re: Mismatching Codes -
ReD_HunTeR - 09.03.2014
show your /as command
Re: Mismatching Codes -
McBan - 09.03.2014
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];