Need help with removehouse by id...
#1

Hello members of this forum help is needed as fire.. I don't know how to get this to work to remove it by id... Maybe some one can help me out
so here is my command

pawn Код:
YCMD:removehouse(playerid, params[], help)
{
    #pragma unused help
    #pragma unused params
    if(pInfo[playerid][Admin] < 1337) return 0;
    new h = GetClosetHouseID(playerid),file[32];
    if(h == -1) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"There is no house.");
    format(file,32,House_File,h);
    if(fexist(file))
    {
        fremove(file);
        DestroyDynamicPickup(House[h][PickupU]);
        DestroyDynamic3DTextLabel(House[h][DLabel]);
        DestroyDynamicMapIcon(House[h][Icon]);
    }
    return 1;
}
Reply
#2

pawn Код:
YCMD:removehouseid(playerid, params[], help)
{
    #pragma unused help
    new hid;
    if(sscanf(params,"i",hid)) return SendClientMessage(playerid,-1,"Usage: /removehouseid [houseid]");
    if(pInfo[playerid][Admin] < 1337) return 0;
    new h = hid,file[32];
    if(h == -1) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"There is no house with this id.");
    format(file,32,House_File,h);
    if(fexist(file))
    {
        fremove(file);
        DestroyDynamicPickup(House[h][PickupU]);
        DestroyDynamic3DTextLabel(House[h][DLabel]);
        DestroyDynamicMapIcon(House[h][Icon]);
    }
    return 1;
}
It would be something like this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)