25.02.2014, 22:29
pawn Код:
CMD:showlicense(playerid, params[])
{
new playerb;
if(sscanf(params,"u",playerb)) return SendClientMessage(playerid,-1,"Usage: /showlicenses [id]");
new string[75];
format(string, sizeof(string),"%s's Licenses | {FFFFFF} [ %s ]", NAMEGET(playerid), pLicenses(playerid));
SendClientMessage(playerid, 0xFFFF00FF, string);
return 1;
}
stock pLicenses(playerid)
{
new svString[20];
switch (PInfo[playerid][pDriver])
{
case 1: svString = "Licenses not Valid.";
case 2: svString = "Licenses are Valid.";
}
return svString;
}
stock NAMEGET(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}