Dialog problem
#2

pawn Код:
if (dialogid == 2693)
{
    if(response)
    {
        new pName[MAX_PLAYER_NAME],file[200],string[200];
        if(GetPlayerMoney(playerid) < HInfo[GetPVarInt(playerid,"InHouseID")][price]) return SendClientMessage(playerid,red,"You dont have enough cash for this house");
        HInfo[GetPVarInt(playerid,"InHouseID")][owned] = 1;
        format(file,sizeof(file),"FHouse/houses/%i.ini",GetPVarInt(playerid,"InHouseID"));
        GetPlayerName(playerid,pName,sizeof(pName));
        strmid(HInfo[GetPVarInt(playerid,"InHouseID")][owner],pName,0,strlen(pName),255);
        SetPlayerInterior(playerid,HInfo[GetPVarInt(playerid,"InHouseID")][interior]);
        SetPlayerVirtualWorld(playerid,HInfo[GetPVarInt(playerid,"InHouseID")][world]);
        SetPlayerPos(playerid,HInfo[GetPVarInt(playerid,"InHouseID")][telex],HInfo[GetPVarInt(playerid,"InHouseID")][teley],HInfo[GetPVarInt(playerid,"InHouseID")][telez]);
        GivePlayerMoney(playerid,-HInfo[GetPVarInt(playerid,"InHouseID")][price]);
        INI_Open(file);
        HInfo[GetPVarInt(playerid,"InHouseID")][owned] = 1;
        INI_WriteInt("Owned",1);
        INI_WriteString("Owner",HInfo[GetPVarInt(playerid,"InHouseID")][owner]);
        INI_Save();
        INI_Close();
        format(string,sizeof(string),"Owned by: %s \nHouse cost: %i \nID: %i",pName,HInfo[GetPVarInt(playerid,"InHouseID")][price],GetPVarInt(playerid,"InHouseID"));
        Update3DTextLabelText(HInfo[GetPVarInt(playerid,"InHouseID")][label],0x00FF40FF,string);
        print("readed!");
    }
    return 1;
}
Reply


Messages In This Thread
Dialog problem - by hadzx - 27.03.2011, 13:01
Re: Dialog problem - by HyperZ - 27.03.2011, 13:08

Forum Jump:


Users browsing this thread: 3 Guest(s)