!IsPlayerConnected
#5

Quote:
Originally Posted by nezo2001
View Post
Thank you but i want to add other thing
if (PInfo[playerid][pCop] >= 1
allow him to use the command and if not send him a client message
"You are not a police officer"
if you make it i will rep you :

pawn Code:
CMD:check(playerid,params[])
{
    new targetid;
    if (PInfo[playerid][pCop] < 1) return SendClientMessage(playerid, -1, "You are not a police officer");
    if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"Usage: /check [playerid]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "That player isn't connected!");
    if(PInfo[playerid][pDriver] == 0) return SendClientMessage(playerid, -1, "That player doesn't have license.");
    if(PlayerInfo[playerid][pDriver] == 1) return SendClientMessage(playerid, -1, "That player has a driving license!");
    return 1;
}
Reply


Messages In This Thread
!IsPlayerConnected - by nezo2001 - 11.12.2014, 18:01
Re: !IsPlayerConnected - by HY - 11.12.2014, 18:08
Re: !IsPlayerConnected - by nezo2001 - 11.12.2014, 18:20
Re: !IsPlayerConnected - by M4D - 11.12.2014, 18:24
Re: !IsPlayerConnected - by Schneider - 11.12.2014, 18:24

Forum Jump:


Users browsing this thread: 4 Guest(s)