check command [REP++]
#1

I want a command for police officers to check if the player has a drive license or not
like :
/check [id]
if the player has a driver license
PHP код:
SendClientMessage("the player has a driver liscense"); 
if he doesnt have
PHP код:
SendClientMessage("the player doesnt have a driver license"); 
Please help
Reply
#2

add in your playerinfo enum bool:License

pawn Код:
CMD:check(playerid,params[])
{
    new targetid;
    if(sscanf(params,"d",targetid)) return SendClientMessage(playerid,-1,"Usage: /check [playerid]")
    if(pInfo[targetid][License] == true)
    {
        SendClientMessage(playerid,-1,"Player has a license.");
    }
    else SendClientMessage(playerid,-1,"Player doesnt have a license.")
    return 1;
}
Reply
#3

Quote:
Originally Posted by Dziugsas
Посмотреть сообщение
add in your playerinfo enum bool:License

pawn Код:
CMD:check(playerid,params[])
{
    new targetid;
    if(sscanf(params,"d",targetid)) return SendClientMessage(playerid,-1,"Usage: /check [playerid]")
    if(pInfo[targetid][License] == true)
    {
        SendClientMessage(playerid,-1,"Player has a license.");
    }
    else SendClientMessage(playerid,-1,"Player doesnt have a license.")
    return 1;
}
If it work i will rep you
Reply


Forum Jump:


Users browsing this thread: