27.07.2015, 11:48
Код:
#include <YSI/y_commands> YCMD:shop(playerid,params[],help) { new listtext[512],substr[40]; if(help) { SEM(playerid,"CMDINFO: Displays shop to buy special weapons!"); return 1; } forex(i, 13) { if(PlayerInfo[playerid][WeaponsPurchased][i]) { format(substr,sizeof(substr),"%s - {33AA33}PURCHASED\n",GunNames[SelledGun[i][Weaponid]]); } else { format(substr,sizeof(substr),"%s - $%d\n",GunNames[SelledGun[i][Weaponid]],SelledGun[i][Price]); } strcat(listtext,substr,sizeof(listtext)); } ShowPlayerDialog(playerid,DIALOG_BUY_GUN,DIALOG_STYLE_LIST,"Guns Shop",listtext,"Buy","Exit"); return 1; }