27.03.2014, 09:51
Well, If you have you licenses it doenst show up in /showlicenses, but you see it in /licenses
pawn Код:
CMD:showlicenses(playerid, params[])
{
new string[256], playerb, carlicense[128], flylicense[128], weplicense[128];
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /showlicenses [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(PlayerInfo[playerb][pCarLic] == 1) format(carlicense, sizeof(carlicense), "Passed");
else if(PlayerInfo[playerb][pCarLic] == 0) format(carlicense, sizeof(carlicense), "Not Passed");
if(PlayerInfo[playerb][pFlyLic] == 1) format(flylicense, sizeof(flylicense), "Passed");
else if(PlayerInfo[playerb][pFlyLic] == 0) format(flylicense, sizeof(flylicense), "Not Passed");
if(PlayerInfo[playerb][pWepLic] == 1) format(weplicense, sizeof(weplicense), "Passed");
else if(PlayerInfo[playerb][pWepLic] == 0) format(weplicense, sizeof(weplicense), "Not Passed");
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
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", carlicense);
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Flying License Status: {FFFFFF}%s", flylicense);
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Weapon License Status: {FFFFFF}%s", weplicense);
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
return 1;
}