27.03.2014, 09:57
pawn Код:
CMD:showlicenses(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
new playerb;
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /showlicenses [playerid]");
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
new string[43];
format(string, sizeof(string), "|____ %s Licenses ____|", RPN(playerid));
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Name: {FFFFFF}%s", RPN(playerid));
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Driving License Status: {FFFFFF}%s", (PlayerInfo[playerb][pCarLic]) ? ("Passed") : ("Not Passed"));
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Flying License Status: {FFFFFF}%s", (PlayerInfo[playerb][pFlyLic]) ? ("Passed") : ("Not Passed"));
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Weapon License Status: {FFFFFF}%s", (PlayerInfo[playerb][pWepLic]) ? ("Passed") : ("Not Passed"));
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
return 1;
}