createbar?
#1

Ok i was changing up createbar then when i create in game and look at my DB, it doesnt INSERT anything
pawn Код:
CMD:createbar(playerid,params[])
    {
        if(PlayerData[playerid][AdminLevel] < 4) return 0;
        new barid = GetBarid();
        new bint = GetPlayerInterior(playerid);
        new bworld = GetPlayerVirtualWorld(playerid);
        if(barid == 0) return SCM(playerid,red,"ERROR: You have reached the maximum ID");
        GetPlayerPos(playerid,X,Y,Z);
        format(str,sizeof(str),"INSERT INTO Bars (ID,PosX,PosY,PosZ,Int,World) VALUES ('%d','%f','%f','%f','%i','%i')",GetBarid(),X,Y,Z,bint,bworld);
        mysql_query(str);
        UnloadBar();
        SetTimerEx("ReloadBar",5000,0,"i",playerid);
        format(str,sizeof(str),"You have created Bar ID: %d, all bars will load in 5 seconds",barid);
        SCM(playerid,orange,str);
        return 1;
    }
Reply


Messages In This Thread
createbar? - by Tanush123 - 07.01.2012, 22:27
Re: createbar? - by Tanush123 - 08.01.2012, 03:56
Re: createbar? - by Jochemd - 08.01.2012, 09:12
Re: createbar? - by Tanush123 - 08.01.2012, 15:17

Forum Jump:


Users browsing this thread: 1 Guest(s)