!IsPlayerConnected
#1

Here is my command
PHP Code:
CMD:check(playerid,params[])
{
    new 
targetid;
    
    if(
sscanf(params,"d",targetid)) return SendClientMessage(playerid,-1,"Usage: /check [playerid]");
    if(
PInfo[playerid][pDriver] == 1)
    {
        
SendClientMessage(playerid,-1,"Player has a license.");
    }
    else if(
PInfo[playerid][pDriver] == 0)
    {
     
SendClientMessage(playerid,-1,"Player doesnt have a license.");
    }
    else if(!
IsPlayerConnected(id))
     {
     
SendClientMessage(playerid,-4,"That player is not connected!");
     }
    return 
1;

It works but when i type `/check [any other id that isn't connected] it also send me "Player has a license" what should i do ??
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: 2 Guest(s)