Gang cmd callback
#1

Yo guys again im askin for help;/

I know this problem i have to add command to OnPlayerCommandText callback but i wanted to ask how to make the line which has to be added to callbacks.I would be realy glad if you could tel me ;/

So thi is the cmd which i made:
PHP код:
 dcmd_ganghelp(playerid,params[])
{
    
#pragma unused params
    
if(IsSpawned[playerid] != 1)
    {
        
SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}You must be alive and spawned in order to be able to use this command.");
        return 
1;
    }
    if(
IsKidnapped[playerid] == 1)
    {
        
SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}You are kidnapped. You cannot use this command.");
        return 
1;
    }
    if(
IsFrozen[playerid] == 1)
    {
        
SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}You have been frozen by a Server Administrator. You cannot use this command.");
        return 
1;
    }
    
ShowPlayerDialog(playerid,DIALOG_COMMANDS,DIALOG_STYLE_MSGBOX,"Gang Commands","{FFFFFF}/gangs /acceptgang /loadganginfo /g /adjustgang /giverank /gkick /ginvite /gquit /gclothes /gmembers /sendgangmessage /savegang","Ok","Cancel");
 return 
1;

After compiling it pawno shows me this:
PHP код:
C:\Users\WeeD\Desktop\Samp\gamemodes\SFCRRPG.pwn(16214) : warning 203symbol is never used"dcmd_ganghelp" 
Reply
#2

Something is wrong with your dcmd define.

Nevertheless, I recommend you to use zCMD because dcmd is very old and unefficient.
Reply
#3

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Something is wrong with your dcmd define.

Nevertheless, I recommend you to use zCMD because dcmd is very old and unefficient.
Umm i like to script with dcmd because i understand it abit ;/

But thing is i need the code which has to be added to defines ( OnPlayerCommandText callback) like this one dcmd(changename,10,cmdtext);

And i want to know how to create it so i dont have to ask for it every time when i make anew cmd..
Reply
#4

Plss i need this asap

P.S Sorry for dublepost ;/
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)