SA-MP Forums Archive
Gang cmd callback - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gang cmd callback (/showthread.php?tid=506708)



Gang cmd callback - weedxd - 14.04.2014

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" 



Re: Gang cmd callback - Dignity - 14.04.2014

Something is wrong with your dcmd define.

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


Re: Gang cmd callback - weedxd - 14.04.2014

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..


Re: Gang cmd callback - weedxd - 14.04.2014

Plss i need this asap

P.S Sorry for dublepost ;/