Денис!
Новичок
PHP:
if(strcmp(cmd, "/heal", true) == 0)
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "* Вы не залогинены!");
return 1;
}
if(PlayerInfo[playerid][pMember]==4 )//model
{
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите:{FFFFFF} /heal [id]");
giveplayerid = ReturnUser(tmp);
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new giveambu = GetPlayerVehicleID(giveplayerid);
new playambu = GetPlayerVehicleID(playerid);
if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GRAD1, "Вы не можете вылечить себя!");
if(PlayerInfo[playerid][pMember]==4)//model
{
if (IsAnAmbulance(playambu) && playambu == giveambu)
{
format(string, sizeof(string), "Вы предложили вылечить %s за %d $.",giveplayer,healpric);
SendClientMessage(playerid, 0x6495EDFF, string);
new healdialog[256];
format(healdialog,sizeof(healdialog), "Желаете вылечиться за %d $?",healpric);
ShowPlayerDialog(giveplayerid,5522,DIALOG_STYLE_MSGBOX,"Лечение", healdialog, "Да", "Нет");
HealOffer[giveplayerid] = playerid;
HealPrice[giveplayerid] = healpric;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не медик!");
return 1;
}
}
return 1;
}
КАк сделать что бы цена за которую врач вылечил давалась врачу?
