/hexit command bugged
#1

Hi there! /hexit is simply defining the exit place of a house. The bug is that when I use it IG, it says "Invalid House ID" Here's the code.

PHP код:
CMD:hexit(playeridparams[])
{
    if(
IsPlayerConnected(playerid))
    {
        new 
houseid PlayerInfo[playerid][pVW];
        if (
PlayerInfo[playerid][pAdmin] > 1336)
        {
            new 
path[22];
            
format(pathsizeof(path), "Houses/House_%04d.ini"houseid);
            if(!
fexist(path))
            {
                
SendClientMessage(playeridCOLOR_RED"ERROR: Invalid house ID.");
                return 
1;
            }
            new 
string[90];
            new 
FloatxFloatyFloatz;
            
GetPlayerPos(playeridxyz);
            
DOF2_SetFloat(path"ExX"x"General");
            
DOF2_SetFloat(path"ExY"y"General");
            
DOF2_SetFloat(path"ExZ"z"General");
            
GetPlayerFacingAngle(playeridz);
            if(
180)
            {
                
180;
            }
            else
            {
                
180;
            }
            
DOF2_SetFloat(path"ExA"z"General");
            
DOF2_SaveFile();
            
format(stringsizeof(string), "SERVER: You have successfully set the exit of house ID %d"houseid);
            
SendClientMessage(playeridCOLOR_ADMINstring);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"ERROR: You don't have the premission to use that command.");
        }
    }
    return 
1;

Reply


Messages In This Thread
/hexit command bugged - by NealPeteros - 20.08.2016, 16:39
Re: /hexit command bugged - by NealPeteros - 20.08.2016, 16:43
Re: /hexit command bugged - by Shinja - 20.08.2016, 16:58
Re: /hexit command bugged - by Abagail - 20.08.2016, 17:12
Re: /hexit command bugged - by NealPeteros - 20.08.2016, 17:40
Re: /hexit command bugged - by Shinja - 20.08.2016, 18:00
Re: /hexit command bugged - by NealPeteros - 21.08.2016, 01:06
Re: /hexit command bugged - by Shinja - 21.08.2016, 01:25
Re: /hexit command bugged - by NealPeteros - 21.08.2016, 01:40
Re: /hexit command bugged - by Threshold - 21.08.2016, 01:44

Forum Jump:


Users browsing this thread: 1 Guest(s)