alex600
Умник
переведите пожалуйста комманду на dc_cmd
PHP:
if(strcmp(cmd, "/showlicenses",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Введите: /showlicenses [id]");
return true;
}
giveplayerid = strval(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Чтобы посмотреть лицензии введите /licenses"); return true; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new text1[20];
new text2[20];
new text3[20];
new text4[20];
new text5[20];
if(PlayerInfo[playerid][pCarLic]) { text1 = "Есть"; } else { text1 = "Отсутствует"; }
if(PlayerInfo[playerid][pFlyLic]) { text4 = "Есть"; } else { text4 = "Отсутствует"; }
if(PlayerInfo[playerid][pBoatLic]) { text2 = "Есть"; } else { text2 = "Отсутствует"; }
if(PlayerInfo[playerid][pFishLic]) { text3 = "Есть"; } else { text3 = "Отсутствует"; }
if(PlayerInfo[playerid][pGunLic]) { text5 = "Есть"; } else { text5 = "Отсутствует"; }
format(string, sizeof(string), "-----------===[ LICENSES %s ]===-----------", sendername);
SendClientMessage(giveplayerid, 0x059BD3AA, string);
format(string, sizeof(string), " Водительские права: %s", text1);
SendClientMessage(giveplayerid, 0xC5EEFEAA, string);
format(string, sizeof(string), " Лицензия пилота: %s", text4);
SendClientMessage(giveplayerid, 0xC5EEFEAA, string);
format(string, sizeof(string), " Лицензия на катера: %s", text2);
SendClientMessage(giveplayerid, 0xC5EEFEAA, string);
format(string, sizeof(string), " Лицензия рыболова: %s", text3);
SendClientMessage(giveplayerid, 0xC5EEFEAA, string);
format(string, sizeof(string), " Лицензия на оружие: %s", text5);
SendClientMessage(giveplayerid, 0xC5EEFEAA, string);
format(string, sizeof(string), "=============================", giveplayer);
SendClientMessage(playerid, 0x059BD3AA, string);
format(string,sizeof(string), "%s показал свои лицензии %s'у",sendername,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string,sizeof(string), "показал свои лицензии %s'у",giveplayer);
SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Игрок далеко от вас");
return true;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Игрок не найден");
return true;
}
}
return true;
}
