/orgs problem
#1

pawn Код:
CMD:orgs(playerid,params[])
{
    new orgsid,orgsname[50],lname[20],orgsmembers;
    SendClientMessage(playerid,-1,"-------------------Organization List--------------------");
    for(new i = 0;i<MAX_ORGS;i++)
    {
        CheckMySQL();
        format(str, sizeof(str), "SELECT * FROM orgs",orgid);
        mysql_query(str);
        mysql_store_result();
        if(mysql_num_rows() != 0)
        {
            format(str,sizeof(str), "SELECT * FROM orgs WHERE Name = %s,Orgid = %d,Leader = %s,Members = %d",orgsname,orgsid,lname,orgsmembers);
            mysql_query(str);
            format(str,sizeof(str),"Organization Name: %s || Organization ID: %d || Organization Leader: %s || Organization Members: %d",orgsname,orgsid,lname,orgsmembers);
            SendClientMessage(playerid,-1,str);
            mysql_free_result();
        }
        mysql_store_result();
        if(mysql_num_rows() == 0)
        {
            mysql_free_result();
            SendClientMessage(playerid,red,"ERROR: No Organization are created in the server!");
        }
    }
    return 1;
}
Well when i create a org and use /orgs, it spams crazy.
2. When i have no orgs created it doesnt show no organization are created in the server, it only shows -------------organization list-----------
3.When i only created org id 1, it shows the wrong info on /orgs. it had a spawn of Org id 0...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)