check if player
#1

hello guys how can i check if player is muted or forzen or jailed etc!
Reply
#2

Here is something that can help you

pawn Код:
if(GetPVarInt(playerid,"Jailed") == 1)
{
   //Your Code Here
   return 1;
}
Reply
#3

pawn Код:
if(PlayerInfo[playerid][muted] > 0)
{
// return what you want here....
    return 1;
}
pawn Код:
if(muted[playerid] > 0)
{
// return what you want here....
    return 1;
}
pawn Код:
if(GetPVarInt(playerid,"muted") == 1)
{
// return what you want here....
   return 1;
}
Reply
#4

Код:
if(PlayerInfo[playerid][muted] == 1) // This line checks if the player is muted if so it does something. 
{

// this what it will return if the player is muted. 
   return 1;
}

if(PlayerInfo[playerid][injail] == 1) // This line checks if the player is in jail if so it does something. 
{

// this what it will return if the player is muted. 
   return 1;
}

if(PlayerInfo[playerid][frozen] == 1) // This line checks if the player is frozen if so it does something.
{

// this what it will return if the player is muted. 
   return 1; 
}
For example:

Код:
if(PlayerInfo[playerid][injail] == 1) // We have cheked that the player is in prison.
{ 
    SendClientMessage(playerid, RED, "You can't use that command in jail"); // After we found out he is in prison we tell him that the command he is using is forrbiden in prison. 
    return 1; 

}
Reply
#5

Depend on wich code are you based
Reply
#6

Quote:
Originally Posted by iJumbo
Посмотреть сообщение
Depend on wich code are you based
Correct, dont forget to add those stats in your 'PlayerInfo'.
Or else, check how they are called in your PlayerInfo stats.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)