How can i create a command with three space???
#6

I find this way much easier:
PHP код:
CMD:gang(playeridparams[])
{
    new
        
tmp_name[50];
        
    if (!
sscanf(params"'create's[50]"tmp_name))
    {
        if(
gang[playerid][gid] != -1) return SendClientMessage(playerid,COLOR_GREEN"[GANG]:{FFFFFF}Leave your gang with /gang leave before creating a new one!");
        if(!(
<= strlen(tmp_name) <= 49)) return SendClientMessage(playeridCOLOR_GREEN"[GANG]:{FFFFFF} /gang create (GANG NAME)");
        if(
IsgangTaken(tmp_name)) return SendClientMessage(playeridCOLOR_GREEN"[GANG]:{FFFFFF}gang name is already in use!");
        
Creategang(tmp_nameplayerid);
    }
    else if (!
strcmp(params"leave"true))
    {
        
// code for "/gang leave"
    
}
    else 
SendClientMessage(playeridCOLOR_GREEN"[GANG]:{FFFFFF} /gang <create (GANG NAME)/leave>");
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)