Help me again
#1

Hello guys...this time im wondering how to check is player let we say stuned.So if player is stuned you wount be able to stun him again.
I did this: i made cmd that toggles your controll to off and added timer for 3 sec after 3 secs it gives you controll back again (auto untaze)
So waht im wondering is how to check is player stuned so if i /stun someone and try to /stun him again it will give me message that player is already stuned and that i cant stun him again. After 3 sec that player get scontroll back (my cmd) and then you can /stun him again.
Thanks
Reply
#2

Use variables something like this:

pawn Код:
new Stunned[MAX_PLAYERS];

Public OnPlayerConnect(playerid)
{
     Stunned[playerid] =0;//make the player not stunned when he enters the server
     return 1;
}
CMD:stun(playerid, params[])
{
      if(Stunned[playerid] 0)//saying if he is not stunned
     {
       //your code
        Stunned[playerid] =1;//set him stunned
     else
     {
         //your code if he is stunned
      }
     return 1;
}

Public Timer
{
     Stunned[playerid] =0;//set him to not stunned
}
sorry for bad indentation etc i wrote in the forum reply thing
Reply
#3

Still not helping...someone else please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)