check command [REP++] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: check command [REP++] (
/showthread.php?tid=550206)
check command [REP++] -
nezo2001 - 11.12.2014
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
Re: check command [REP++] -
Dziugsas - 11.12.2014
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;
}
Re: check command [REP++] -
nezo2001 - 11.12.2014
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