[Ajuda] linha dando erro
#8

PHP код:
#include < a_samp >
#include < sscanf >
#include < dof2 >
#include < zcmd >
#define MAX_HOUSES 100
enum InfoH
{
    
hID,
    
Float:hIcone[3],
    
hPreco,
    
hDono[25],
    
hCofre,
    
hAluguel,
    
hCarro,
    
Float:hCarroPos[3],
    
hInterior
}
new 
HInfo[MAX_HOUSES][InfoH];
main(){    print("Sistema de casas");}
public 
OnGameModeInit()
{
    
UsePlayerPedAnims();
    
DisableInteriorEnterExits();
    
SetGameModeText("HOUSE SCRIPT");
    
AddPlayerClass(23, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    
    
     for(new 
i = 0; i < MAX_HOUSES; ++i)
    {
        if(!
DOF2_FileExists(ArquivosCasas(i))) return 0;
    }
    return 
1;
}
public 
OnGameModeExit()
{
    
DOF2_Exit();
    return 
1;
}
public 
OnPlayerRequestClass(playerid, classid)
{
    
SpawnPlayer(playerid);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnPlayerDisconnect(playerid, reason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    return 
1;
}
public 
OnPlayerDeath(playerid, killerid, reason)
{
    return 
1;
}
CMD:criarcasa(playerid, params[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo tem permisгo para usar este comando!");
    new 
id, intr, preco;
    if(
sscanf(params, "ddd", id, intr, preco)) return SendClientMessage(playerid, -1, "/criarcasa id interior preco");
    if(
DOF2_FileExists(ArquivosCasas(id))) return SendClientMessage(playerid, -1, "Casa jб existe");
    new 
Float:Pos[3];
    
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    
HInfo[id][hInterior] = intr;
    
HInfo[id][hID] = id;
    
HInfo[id][hCofre] = 0;
    
HInfo[id][hCarro] = 265;
    
HInfo[id][hPreco] = preco;
    
HInfo[id][hAluguel] = 0;
    
HInfo[id][hCarroPos][0] = 0, HInfo[id][hCarroPos][1] = 0, HInfo[id][hCarroPos][2] = 0;
    new 
str[120];
    
format (str, sizeof(str), "O Administrador %s criou uma casa id %d valor: %d", GetNome(playerid), id, preco);
    
SendClientMessageToAll(-1, str);
    new 
stx[25];
    
format (stx, sizeof(stx), "Ninguйm");
    
HInfo[id][hDono] = stx;
    
HInfo[id][hIcone][0] = Pos[0], HInfo[id][hIcone][1] = Pos[1], HInfo[id][hIcone][2] = Pos[2];
    
    
DOF2_CreateFile(ArquivosCasas(id));
    
DOF2_SetInt(ArquivosCasas(id), "ID", HInfo[id][hID]);
    
DOF2_SetString(ArquivosCasas(id), "Dono", HInfo[id][hDono]);
    
DOF2_SetInt(ArquivosCasas(id), "Interior", HInfo[id][hInterior]);
    
DOF2_SetInt(ArquivosCasas(id), "Cofre", HInfo[id][hCofre]);
    
DOF2_SetInt(ArquivosCasas(id), "Preco", HInfo[id][hPreco]);
    
DOF2_SetInt(ArquivosCasas(id), "Alguel", HInfo[id][hAluguel]);
    
DOF2_SetFloat(ArquivosCasas(id), "CarroPosx", HInfo[id][hCarroPos][0]);
    
DOF2_SetFloat(ArquivosCasas(id), "CarroPosy", HInfo[id][hCarroPos][1]);
    
DOF2_SetFloat(ArquivosCasas(id), "CarroPosz", HInfo[id][hCarroPos][2]);
    
DOF2_SaveFile();
    return 
1;
}
GetNome(playerid)
{
    new 
pNome[MAX_PLAYER_NAME];
    
GetPlayerName(playerid, pNome, 24);
    return 
pNome;
}
ArquivosCasas(idcasa){
    new 
arquivo[64];
    
format(arquivo, sizeof(arquivo), "casas/casa%d.ini", idcasa);
    return 
arquivo;
} 
Reply


Messages In This Thread
linha dando erro - by Duun - 21.10.2018, 20:48
Re: linha dando erro - by Duun - 21.10.2018, 20:50
Re: linha dando erro - by ipsLuan - 21.10.2018, 20:51
Re: linha dando erro - by Felipealves - 21.10.2018, 21:02
Re: linha dando erro - by Duun - 21.10.2018, 21:03
Re: linha dando erro - by Duun - 21.10.2018, 21:05
Re: linha dando erro - by Duun - 21.10.2018, 21:19
Re: linha dando erro - by Felipealves - 21.10.2018, 21:21
Re: linha dando erro - by Duun - 21.10.2018, 21:26
Re: linha dando erro - by Felipealves - 21.10.2018, 21:29

Forum Jump:


Users browsing this thread: 1 Guest(s)