whats wrong?
#1

this keeps appearing with Server: Unknown Command
pawn Код:
dcmd_sellhouse(playerid,params[])
{
    #pragma unused params
    new pName[MAX_PLAYER_NAME],string[128],file[128],housename[128],string2[128];
    for(new i = -1; i < MAX_HOUSES; i++)
    {
        if(!IsPlayerInRangeOfPoint(playerid, 3, HInfo[i][HX], HInfo[i][HY], HInfo[i][HZ])) continue;
        GetPlayerName(playerid,pName,sizeof(pName));
        format(string,sizeof(string),"%s",pName);
        if(strcmp(HInfo[i][ownername], string, true) != 0) return SCM(playerid,red,"Error: You dont own this House");
        format(file,sizeof(file),"HouseSystem/Houses/%d.ini",i);
        format(housename,sizeof(housename),"No Owner");
        format(string2,sizeof(string2),"House on sale for: %d$",dini_Int(file,"Price"));
        format(string,sizeof(string),"||- Info: %s has bought a house for %d$ -||",pName,HInfo[i][price]);
        strmid(HInfo[i][ownername], housename, 0, strlen(housename), 255);
        dini_IntSet(file,"Owned",0);
        dini_Set(file,"Ownername","No owner");
        HInfo[i][owned] = false;
        Delete3DTextLabel(houseowner[i]);
        houseinfo[i] = Create3DTextLabel(string2 ,0x0EFE01FF,dini_Float(file,"HX"),dini_Float(file,"HY"),dini_Float(file,"HZ")+1,20.0,0);
        SendClientMessageToAll(0xF50ACCFF,string);
        return 1;
    }
    SendClientMessage(playerid, 0xF60000AA, "You are not close enough to a house");
    return 1;
}
Reply
#2

pawn Код:
for(new i = 0; i < MAX_HOUSES; i++)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)