Gressie
Мастер
Всем привет делать было нечего, вот написал команду /iwep для админов как на самп рп.
Сама команда:
Позже оптимизацию сделаю.
Скриншот:
Автор: Maks5 and musyto.
Сама команда:
PHP:
if(strcmp(cmd, "/iwep", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1) return 1;
new str[128],sctring[2000];
tmp = strtok(cmdtext,idx);
if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /iwep [id игрока]");
giveplayerid = ReturnUser(tmp);
if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Игрок оффлайн");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(str,sizeof(str),"{33CC00}%s\n\n", giveplayer);strcat(sctring,str);
format(str,sizeof(str),"{ffff00}State: %d\n", GetPlayerState(giveplayerid));strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}0 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][0], PlayerInfo[giveplayerid][pSlotammo][0]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}1 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][1], PlayerInfo[giveplayerid][pSlotammo][1]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}2 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][2], PlayerInfo[giveplayerid][pSlotammo][2]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}3 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][3], PlayerInfo[giveplayerid][pSlotammo][3]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}4 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][4], PlayerInfo[giveplayerid][pSlotammo][4]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}5 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][5], PlayerInfo[giveplayerid][pSlotammo][5]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}6 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][6], PlayerInfo[giveplayerid][pSlotammo][6]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}7 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][7], PlayerInfo[giveplayerid][pSlotammo][7]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}8 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][8], PlayerInfo[giveplayerid][pSlotammo][8]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}9 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][9], PlayerInfo[giveplayerid][pSlotammo][9]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}10 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][10], PlayerInfo[giveplayerid][pSlotammo][10]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}11 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][11], PlayerInfo[giveplayerid][pSlotammo][11]);strcat(sctring,str);
format(str,sizeof(str),"{ff00ff}12 \t Weaponid: %d \t Guns: %d\n", PlayerInfo[giveplayerid][pSlot][12], PlayerInfo[giveplayerid][pSlotammo][12]);strcat(sctring,str);
ShowPlayerDialog(playerid,22815,DIALOG_STYLE_MSGBOX,"Информация оружия",sctring,"Закрыть","");
return 1;
}
Скриншот:
Последнее редактирование:
