Command partly isn't working
#1

I was creating a house system. So this command should create a house:
pawn Код:
CMD:createhouse(playerid,params[])
{
    new HousePrice,tmp=HouseCount;
    if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid,0xFF0000FF,"Tu negali naudot sitos komandos,lops");
    else if(sscanf(params,"d",HousePrice)) SendClientMessage(playerid,0xFF0000FF,"Naudojimas /createhouse [Namo Kaina]");
    else
    {
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid,x,y,z);
        HouseInfo[tmp][Price]=HousePrice;
        HouseInfo[tmp][Owned]=0;
        HouseInfo[tmp][PosX]=x;
        HouseInfo[tmp][PosY]=y;
        HouseInfo[tmp][PosZ]=z;
        HouseInfo[tmp][VirtualWorld] = GetPlayerVirtualWorld(playerid);
        HouseEnter[tmp]=CreateDynamicCP(x,y,z,1.5,GetPlayerVirtualWorld(playerid));
        format(HouseInfo[tmp][Owner],24,"None");
        HouseExit[tmp]=CreateDynamicCP(443.9237,509.4609,1001.4195,1.5,GetPlayerVirtualWorld(playerid));
        new query[128],labelstring[126];
        format(query,sizeof(query),"INSERT INTO houses (Owner,Owned,VirtualWorld,PosX,PosY,PosZ,Price) VALUES ('%s',0,%d,%f,%f,%f,%s)",HouseInfo[tmp][Owner],GetPlayerVirtualWorld(playerid),x,y,z,HousePrice);
        mysql_query(query);
        format(labelstring,sizeof(labelstring),"Namas Parduodamas \n Kaina:%d \nNoredamas pirkti rasyk /buyhouse",HousePrice);
        HouseInfo[tmp][HouseLabel] = Create3DTextLabel(labelstring,0x00FF00FF,x,y,z,25,GetPlayerVirtualWorld(playerid),0);
        HouseCount++;
    }
    return 1;
}
But the thing is, if I use /createhouse, it works,it sends the text.But if I use it correctly, /creathouse 1000, I get: Server:Unknown command. Like wtf?
Reply


Messages In This Thread
Command partly isn't working - by dusk - 02.03.2013, 12:06
Re: Command partly isn't working - by Djole1337 - 02.03.2013, 12:29
Re: Command partly isn't working - by dusk - 02.03.2013, 14:07
Re: Command partly isn't working - by dusk - 02.03.2013, 15:37
Re: Command partly isn't working - by Catalyst- - 02.03.2013, 15:49
Re: Command partly isn't working - by dusk - 02.03.2013, 15:57
Re: Command partly isn't working - by dusk - 02.03.2013, 18:30
Re: Command partly isn't working - by Ruben_Alonso - 02.03.2013, 18:47
Re: Command partly isn't working - by dusk - 02.03.2013, 18:53
Re: Command partly isn't working - by Catalyst- - 02.03.2013, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)