CMD:givelicense(playerid, params[])
{
if(!IsAInstructor(playerid)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti instructor.");
new x_nr[30],id,sendername[30],giveplayer[30],string[128];
if(sscanf(params, "s[30]u",x_nr,id))
{
SendClientMessage(playerid, COLOR_GREY, "Sintaxa: {FFFFFF}/givelicense <License name> <playerid/name>");
SendClientMessage(playerid, COLOR_WHITE, "License: Sailing, Fishing, Weapon, Flying.");
return 1;
}
if(IsInBlacklist(id, 12)) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player este pe blacklistul factiunii tale.");
if(IsInBlacklist(id, 19)) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player este pe blacklistul factiunii tale.");
if(id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu este conectat.");
if(strcmp(x_nr,"flying",true) == 0)
{
PlayerInfo[playerid][pCommands] ++;
Update(playerid, pCommandsx);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(id, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "I-ai dat licenta de zbor de %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Instructor %s ti-a dat licenta de zbor.",sendername);
SendClientMessage(id, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de zbor.",sendername,giveplayer);
SendFactionMessage(12,COLOR_WHITE,string);
SendFactionMessage(19, COLOR_WHITE, string);
PlayerInfo[id][pFlyLic] = 1;
PlayerInfo[id][pFlyLicT] = 100;
Update(id, pFlyLicx);
Update(id, pFlyLicTx);
format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]);
SCM(playerid, COLOR_WHITE, string);
return 1;
}
else if(strcmp(x_nr,"sailing",true) == 0)
{
PlayerInfo[playerid][pCommands] ++;
Update(playerid, pCommandsx);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(id, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "I-ai dat licenta de navigatie lui %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Instructor %s ti-a dat licenta de navigatie.",sendername);
SendClientMessage(id, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de navigatie.",sendername,giveplayer);
SendFactionMessage(12,COLOR_WHITE,string);
SendFactionMessage(19, COLOR_WHITE, string);
PlayerInfo[id][pBoatLic] = 1;
PlayerInfo[id][pBoatLicT] = 100;
Update(id, pBoatLicx);
Update(id, pBoatLicTx);
format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]);
SCM(playerid, COLOR_WHITE, string);
return 1;
}
else if(strcmp(x_nr,"fishing",true) == 0)
{
PlayerInfo[playerid][pCommands] ++;
Update(playerid, pCommandsx);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(id, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "I-ai dat licenta de pescar lui %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Instructor %s ti-a dat licenta de pescar.",sendername);
SendClientMessage(id, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de pescar.",sendername,giveplayer);
SendFactionMessage(12,COLOR_WHITE,string);
SendFactionMessage(19, COLOR_WHITE, string);
PlayerInfo[id][pFishLic] = 1;
PlayerInfo[id][pFishLicT] = 100;
Update(id, pFishLicx);
Update(id, pFishLicTx);
format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]);
SCM(playerid, COLOR_WHITE, string);
return 1;
}
else if(strcmp(x_nr,"weapon",true) == 0)
{
PlayerInfo[playerid][pCommands] ++;
Update(playerid, pCommandsx);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(id, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "I-ai dat licenta de arme lui %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Instructor %s ti-a dat licenta arme.",sendername);
SendClientMessage(id, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de arme.",sendername,giveplayer);
SendFactionMessage(12,COLOR_WHITE,string);
SendFactionMessage(19, COLOR_WHITE, string);
PlayerInfo[id][pGunLic] = 1;
PlayerInfo[id][pGunLicT] = 100;
Update(id, pGunLicTx);
Update(id, pGunLicx);
format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]);
SCM(playerid, COLOR_WHITE, string);
return 1;
}
return 1;
}