Код:
CMD:giveweaponlicense(playerid, params[])
{
if(IsACop(playerid)
{
new string[128], giveplayerid, type;
if(sscanf(params, "ud", giveplayerid, type))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /givelicense [playerid] [type]");
SendClientMessageEx(playerid, COLOR_GRAD2, "Types: 1 = Weapon
return 1;
}
if(!IsPlayerConnected(giveplayerid))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid player specified.");
return 1;
}
new year, month, day, hour, minute, second;
switch(type)
{
case 1:
{
if(PlayerInfo[giveplayerid][pWeaponLicense] == 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "This player already has a weapon license.");
return 1;
}
format(string, sizeof(string), "You have given a weapon license to %s.",GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "The Officer %s has given you a weapon license.",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
gettime(hour,minute,second);
getdate(year,month,day);
format(string, sizeof(string), "[%d/%d/%d][%d:%d:%d] Officer %s has given a weapon license to %s.",day,month,year,hour,minute,second,GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
Log("logs/licenses.log", string);
PlayerInfo[giveplayerid][pWeaponLicense] = 1;
return 1;
}
What do you mean ? please provide more information, do you mean it doesn't work or what ?