SA-MP Forums Archive
[Ajuda] Comando ... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando ... (/showthread.php?tid=377543)



Comando ... - dPlaYer_ - 14.09.2012

Estou a criar meu sistema de casas e apуs digitar este comando , o console fecha . alguem pode dizer oque pode ser?
pawn Код:
CMD:criarcasa(playerid, params[])
{
    if(!strlen(params)) return SendClientMessage(playerid, -1, "Use: /criarcasa [preзo] [Interior]");
    new preco[128] , intcasa[128], string[256], StringLabel[200], pickupcasa;
    sscanf(params, "us", preco, intcasa);
    for(new c = 0; c < MAX_CASAS; c++)
    {
        if(!DOF2_FileExists(string))
        {
            static Float:X, Float:Y, Float:Z, virtualw;
            GetPlayerPos(playerid, X, Y, Z);
            DOF2_CreateFile(string);
            virtualw++;
            DOF2_SetFloat(string, "PosX", X);
            DOF2_SetFloat(string, "PosY", Y);
            DOF2_SetFloat(string, "PosZ", Z);
            DOF2_SetString(string, "Interior", intcasa);
            DOF2_SetInt(string, "VirtualWorld", virtualw);
            DOF2_SetInt(string, "TemDono", 0);
            DOF2_SetString(string, "Dono", "Niguem");
            DOF2_SetString(string, "Preco", preco);
            pickupcasa = CreatePickup(1273, 1, DOF2_GetFloat(string, "PosX"), DOF2_GetFloat(string, "PosY"), DOF2_GetFloat(string, "PosZ"), -1);
            DOF2_SetInt(string, "PickupID", pickupcasa);
            format(StringLabel, sizeof(StringLabel),"Casa Nъmero: %d\nPreco: %dR$\nDono: Sem Dono", DOF2_GetInt(string, "Numero"), DOF2_GetInt(string, "Preco"));
            CasaLabel[c] = CreateDynamic3DTextLabel(StringLabel, -1, DOF2_GetFloat(string, "PosX"), DOF2_GetFloat(string, "PosY"), DOF2_GetFloat(string, "PosZ")+0.75,20.0,0,1);
            DOF2_SaveFile();
        }
    }
    return 1;
}



Re: Comando ... - @Riichard - 14.09.2012

Pelo oque eu vi, ele nгo estб criando nada.

Vocк estб usando
pawn Код:
DOF2_CreateFile(string);
Mas cade o format? '-'


Re: Comando ... - dPlaYer_ - 14.09.2012

Oh God , nгo reparei kk'
vou testar.

@


+=4 Rep.