In need of help for new cmd
#1

Oks so i made this:
PHP код:
dcmd_marryhelp(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,"Marriage Commands","{FFFFFF}/marry /maccept /madmit /sex /family","Ok","Cancel");
 return 
1;

When i try to compile it shows me this:
PHP код:
C:\Users\WeeD\Desktop\Samp\gamemodes\SFCRRPG.pwn(16190) : warning 203symbol is never used"dcmd_marryhelp"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Warning

But the line 16190 is the last one and its empty

Please help me im a newbie in this but im trying as hard as i can but im failing all the time
Reply
#2

Define this,

pawn Код:
dcmd(marryhelp,9,cmdtext);
If this is already there then you did like this?

pawn Код:
dcmd(dcmd_marryhelp,9,cmdtext);//this is ULTRA WRONG.
Reply
#3

And except the one Patroool mentioned, you need to define (if not already) dcmd:
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Reply
#4

Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
Define this,

pawn Код:
dcmd(marryhelp,9,cmdtext);
If this is already there then you did like this?

pawn Код:
dcmd(dcmd_marryhelp,9,cmdtext);//this is ULTRA WRONG.
Well but where should i add it becouse i can't find a slot for new cmds to be defined ;/

I dont get it how this could work #define dcmd(marryhelp,9,cmdtext)
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
And except the one Patroool mentioned, you need to define (if not already) dcmd:
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
I have this on 96th lane
PHP код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 
Reply
#6

Add:
pawn Код:
dcmd(marryhelp,9,cmdtext);
in OnPlayerCommandText callback. I posted about the dcmd macro just to be sure in case you had forgot it.
Reply
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Add:
pawn Код:
dcmd(marryhelp,9,cmdtext);
in OnPlayerCommandText callback. I posted about the dcmd macro just to be sure in case you had forgot it.
THANK YOU SO MUCH! ^.^
Reply
#8

pawn Код:
dcmd(marryhelp,9,cmdtext);
Add this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)