Марго*
Ученик
Привет всем, прошу перевести команду на ZCDM
Отвечу +сиками
Отвечу +сиками
PHP:
else if(strcmp(cmd, "/buy", true) == 0)
{
for(new i = 0; i < sizeof(BizzInfo); i++)
{
new inter = GetPlayerInterior(playerid);
new bizinfo[400];
new cena = BizzInfo[i][bCena];
new cena2 = BizzInfo [i][bCena]* 2;
new cena3 = BizzInfo [i][bCena]* 3;
new cena4 = BizzInfo [i][bCena]* 4;
new cena5 = BizzInfo [i][bCena]* 5;
if (PlayerToPoint(10, playerid,BizzInfo[i][bBarX], BizzInfo[i][bBarY], BizzInfo[i][bBarZ]))
{
if( inter == 17 || inter == 16 || inter == 10 || inter == 18)
{
format(bizinfo,sizeof(bizinfo),"1. Телефон [$%d]\n2. Телефонная книга [$%d]\n3. Справочник [$%d]\n4. Аптечки [$%d]\n5. Фотоаппарат [$%d]",cena,cena2,cena3,cena4,cena5);
ShowPlayerDialog(playerid, 5589, DIALOG_STYLE_LIST, "{1e90ff}Магазин 24/7", bizinfo, "Выбрать", "Закрыть");
}
}
}
return true;
}
PHP:
if(strcmp(cmd, "/pm", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "(/pm) [id] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "(/pm) [IDигрока] [текст]");
return 1;
}
format(string, sizeof(string), ">> Сообщение от %s[%d]: %s", sendername, playerid, (result));
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
}
GivePlayerMoney(playerid, -25);
format(string, sizeof(string), ">> Сообщение к %s[%d]: %s", giveplayer, giveplayerid, (result));
SendClientMessage(playerid, COLOR_YELLOW2, string);
PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
PlayerPlaySound(giveplayerid, 1084, 0.0, 0.0, 0.0);
return 1;
}
}
}
else
{
format(string, sizeof(string), "Игрока нет на сервере.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Последнее редактирование:
