01.04.2014, 23:16
pawn Код:
CMD:licenses(playerid, params[])
{
new string[256], carlicense[128], flylicense[128], weplicense[128];
if(PlayerInfo[playerid][pCarLic] == 1) format(carlicense, sizeof(carlicense), "Passed");
else if(PlayerInfo[playerid][pCarLic] == 0) format(carlicense, sizeof(carlicense), "Not Passed");
if(PlayerInfo[playerid][pFlyLic] == 1) format(flylicense, sizeof(flylicense), "Passed");
else if(PlayerInfo[playerid][pFlyLic] == 0) format(flylicense, sizeof(flylicense), "Not Passed");
if(PlayerInfo[playerid][pWepLic] == 1) format(weplicense, sizeof(weplicense), "Passed");
else if(PlayerInfo[playerid][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(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Name: {FFFFFF}%s", RPN(playerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Driving License Status: {FFFFFF}%s", carlicense);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Flying License Status: {FFFFFF}%s", flylicense);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Weapon License Status: {FFFFFF}%s", weplicense);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
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(playerb));
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Name: {FFFFFF}%s", RPN(playerb));
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;
}
CMD:getlicense(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsPlayerInRangeOfPoint(playerid,2.0,962.3975,-1433.5745,14.0537)) return SendClientMessage(playerid, COLOR_GREY, "You are not by the DMV desk.");
SSSShowDialog(playerid, 39);
return 1;
}