06.03.2014, 05:02
http://translate.******.com/#auto/en...6-%3E20-%3Eetc
hello
My problem is I want to use a command to suspend the license of a player by typing / banlic [lincense] [id]
but I do not know how to do it
here is my code. Take a look and help me fix it
By the way I always wanted to ask, I need to score + 1 code per order and use it fulfills the conditions of the code is 8 now online for the score 1 -> 2 and 1 score followed every condition to execute the command + 4 hours will be online.
for example: score 1 -> 2 -> 3 -> 4 -> etc
conditions now done online orders is 8 -> 12 -> 16 -> 20 -> etc
hello
My problem is I want to use a command to suspend the license of a player by typing / banlic [lincense] [id]
but I do not know how to do it
here is my code. Take a look and help me fix it
Код:
CMD:banlic(playerid, params[])
{
if (gTeam[playerid] != 2) return SendClientMessage(playerid, COLOR_BLUE, "Ban khong phai la nhan vien SFPD");
if(isnull(params))
{
SendClientMessage(playerid, COLOR_WHITE, "Su dung: /banlic [giay phep]");
SendClientMessage(playerid, COLOR_GREY, "Giay phep: driver, gun, fly");
return 1;
}
if(strcmp(params, "driver", true) == 0)
{
new lic3[128];
new playerb;
if (gTeam[playerid] != 2 && Rankz[playerid] < 3)
{
SendClientMessage(playerid, COLOR_BLUE, "Chuc vu cua ban khong duoc phep dinh chi giay phep");
}
else
{
if(sscanf(params,"u",playerb)) return SendClientMessage(playerid,COLOR_YELLOW,"Su dung: /banlic [giay phep] [id]");
if(!IsPlayerNearPlayer(playerid, playerb, 5.0)) return SendClientMessage(playerid, COLOR_RED, "Ban o qua xa nguoi do.");
if(HasDrivingLic[playerb] == 0) return SendClientMessage(playerid, COLOR_RED, "Nguoi nay da bi dinh chi giay phep lai xe.");
if(HasDrivingLic[playerb] == 1)
(HasDrivingLic[playerb] = 0);
format(lic3, sizeof(lic3), "** Canh sat %s da dinh chi giay phep lai xe cua ban, ban da nhan duoc ve phat.", NAMEGET(playerid));
SendClientMessage(playerb, COLOR_RED, lic3);
format(lic3, sizeof(lic3), "** Ban da dinh chi giay phep lai xe cua %s.", NAMEGET(playerb));
SendClientMessage(playerid, COLOR_RED, lic3);
}
}
if(strcmp(params, "gun", true) == 0)
{
new lic4[128];
new playerb;
if (gTeam[playerid] != 2 && Rankz[playerid] < 3)
{
SendClientMessage(playerid, COLOR_BLUE, "Chuc vu cua ban khong duoc phep dinh chi giay phep");
}
else
{
if(sscanf(params,"u",playerb)) return SendClientMessage(playerid,COLOR_YELLOW,"Su dung: /banlic [giay phep] [id]");
if(!IsPlayerNearPlayer(playerid, playerb, 5.0)) return SendClientMessage(playerid, COLOR_RED, "Ban qua xa nguoi do.");
if(HasGunLic[playerb] == 0) return SendClientMessage(playerid, COLOR_RED, "Nguoi nay khong co giay phep su dung sung de dinh chi.");
if(HasGunLic[playerb] == 1)
(HasGunLic[playerb] = 0);
format(lic4, sizeof(lic4), "** Canh sat %s danh dinh chi giay phep su dung sung cua ban, ban khong the su dung sung.", NAMEGET(playerid));
SendClientMessage(playerb, COLOR_RED, lic4);
format(lic4, sizeof(lic4), "** Ban da dinh chi giay phep su dung sung cua %s .", NAMEGET(playerb));
SendClientMessage(playerid, COLOR_RED, lic4);
}
}
if(strcmp(params, "fly", true) == 0)
{
new lic5[128];
new playerb;
if (gTeam[playerid] != 2 && Rankz[playerid] < 3)
{
SendClientMessage(playerid, COLOR_BLUE, "Chuc vu cua ban khong duoc phep dinh chi giay phep");
}
else
{
if(sscanf(params,"u",playerb)) return SendClientMessage(playerid,COLOR_YELLOW,"Su dung: /banlic [giay phep] [id]");
if(!IsPlayerNearPlayer(playerid, playerb, 5.0)) return SendClientMessage(playerid, COLOR_RED, "Ban qua xa nguoi do.");
if(HasFlyingLic[playerb] == 0) return SendClientMessage(playerid, COLOR_RED, "Nguoi nay khong co giay phep lai may bay de dinh chi.");
if(HasFlyingLic[playerb] == 1)
(HasFlyingLic[playerb] = 0);
format(lic5, sizeof(lic5), "** Canh sat %s da dinh chi giay phep lai may bay cua ban, ban khong the lai may bay.", NAMEGET(playerid));
SendClientMessage(playerb, COLOR_RED, lic5);
format(lic5, sizeof(lic5), "** Ban da dinh chi giay phep lai may bay cua %.", NAMEGET(playerb));
SendClientMessage(playerid, COLOR_RED, lic5);
}
}
return 1;
}
for example: score 1 -> 2 -> 3 -> 4 -> etc
conditions now done online orders is 8 -> 12 -> 16 -> 20 -> etc


