CMD:showid(playerid, params[]) { new Player; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not a RCON Admin!"); else if (sscanf(params, "u", Player)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO] /showid [Playerid/PartOfName"); else if (Player == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED2, "[INFO]{FFFFFF}: Invalid ID."); else { new string[125]; SendClientMessage(Player,COLOR_LIGHTBLUE,"===================================================="); format(string,sizeof(string),"|| Name : %s || || Gun License : %d ||",RemoveUnderScore(playerid),pInfo[playerid][GunLic]); SendClientMessage(Player,COLOR_GRAY,string); if (pInfo[playerid][LSPD] >= 1) { SendClientMessage(Player,COLOR_GRAY,"Organization: Los Santos Police Department"); SendClientMessage(Player,COLOR_LIGHTBLUE,"===================================================="); } } return 1; }
CMD:showid(playerid, params[])
{
new Player;
new gunlicensetext[5];
if(pInfo[playerid][GunLic] == 1)
{
gunlicensetext = "Yes";
}
else
{
gunlicensetext = "No";
}
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not a RCON Admin!");
else if (sscanf(params, "u", Player)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO] /showid [Playerid/PartOfName");
else if (Player == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED2, "[INFO]{FFFFFF}: Invalid ID.");
else
{
new string[125];
SendClientMessage(Player,COLOR_LIGHTBLUE,"====================================================");
format(string,sizeof(string),"|| Name : %s || || Gun License : %s ||",RemoveUnderScore(playerid),gunlicensetext);
SendClientMessage(Player,COLOR_GRAY,string);
if (pInfo[playerid][LSPD] >= 1)
{
SendClientMessage(Player,COLOR_GRAY,"Organization: Los Santos Police Department");
SendClientMessage(Player,COLOR_LIGHTBLUE,"====================================================");
}
}
return 1;
}
new
var = 1
;
printf( "var: \"%s\"", ( var == 1 ) ? ( "Yes" ) : ( "No" ) );
format(string,sizeof(string),"|| Name : %s || || Gun License : %s ||",RemoveUnderScore(playerid), ( pInfo[playerid][GunLic] == 1 ) ? ( "Yes" ) : ( "No" ) );
new str[30];
switch(pInfo[playerid][GunLic])
{
case 1: str = "Yes";
default: str= "No";
}
format(string,sizeof(string),"|| Name : %s || || Gun License : %s ||",RemoveUnderScore(playerid), (pInfo[playerid][GunLic]) ? ("Yes") : ("No"));
Replace with "Yes" at Gun License?
If yes, take this: pawn Код:
|
CMD:showid(playerid, params[])
{
new Player;
new gunlicensetext[5];
if(pInfo[playerid][GunLic] == 1)
{
gunlicensetext = "Yes";
}
else
{
gunlicensetext = "No";
}
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: You are not a RCON Admin!");
else if (sscanf(params, "u", Player)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO] /showid [Playerid/PartOfName");
else if (Player == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED2, "[INFO]{FFFFFF}: Invalid ID.");
else
{
new string[125];
SendClientMessage(Player,COLOR_LIGHTBLUE,"====================================================");
format(string,sizeof(string),"|| Name : %s || || Gun License : %s ||",RemoveUnderScore(playerid),gunlicensetext);
SendClientMessage(Player,COLOR_GRAY,string);
if (pInfo[playerid][LSPD] >= 1)
{
SendClientMessage(Player,COLOR_GRAY,"Organization: Los Santos Police Department");
SendClientMessage(Player,COLOR_LIGHTBLUE,"====================================================");
}
}
return 1;
}
Gun License : %d
Gun License : %s
Because:
pawn Код:
pawn Код:
|