Making Dynamic Org
#1

EDIT: the problem is
pawn Код:
CMD:createorg(playerid,params[])
{
    if(!IsPlayerAdmin(playerid)) return 0;
    if(sscanf(params,"iis",orgid,orggenre,oname)) return SendClientMessage(playerid,grey,"USAGE: /createorg [Orgid] [Genre] [Name]");
    if(orgid > MAX_ORGS) return SendClientMessage(playerid,red,"Available Org 1-15");
    CheckMySQL();
    format(str,sizeof(str),"SELECT * FROM orgs");
    mysql_query(str);
    mysql_store_result();
    if(mysql_num_rows() == 0)
    {
        mysql_free_result();
        format(str,sizeof(str),"INSERT INTO orgs (Orgid,Name,Genre,Leader,Members,Skin1,Skin2,Skin3) VALUES ('%d','%s','%d',No Leader,0,0,0,0)",orgid,oname,orggenre);
        mysql_query(str);
        format(str,sizeof(str),"You have created created org id %d with genre %d",orgid,orggenre);
        SendClientMessage(playerid,COLOR_YELLOW,str);
        format(str,sizeof(str),"Org Name: %s",oname);
        SendClientMessage(playerid,COLOR_YELLOW,str);
    }
    else
    {
        SendClientMessage(playerid,red,"ERROR: This Organization ID is already used.");
    }
    return 1;
}
Reply


Messages In This Thread
Making Dynamic Org - by Tanush123 - 01.01.2012, 06:25
Re: Making Dynamic Org - by James Coral - 01.01.2012, 06:33
Re: Making Dynamic Org - by Tanush123 - 01.01.2012, 06:50
Re: Making Dynamic Org - by [HiC]TheKiller - 01.01.2012, 06:52
Re: Making Dynamic Org - by Tanush123 - 01.01.2012, 07:01
Re: Making Dynamic Org - by jamesbond007 - 01.01.2012, 07:05
Re: Making Dynamic Org - by Tanush123 - 01.01.2012, 07:09

Forum Jump:


Users browsing this thread: 1 Guest(s)