/me [text] the text comes above your head
#1

Title.

How can I make a emotion command when you type for example:
* davelord is sexy.
[playername] is sexy will become on the player's head that typed it
Reply
#2

pawn Код:
COMMAND:me( playerid, params[ ] )
{
    new
        Name[ MAX_PLAYER_NAME ],
        String[ 128 ],
        Text[ 70 ]
    ;
    GetPlayerName( playerid,Name,MAX_PLAYER_NAME );
    if( sscanf( params,"s[70]",Text ) ) return SendClientMessage( playerid,-1,"Usage /me text" );
   
    format( String,sizeof( String ),"* %s %s",Name,Text );
    SetPlayerChatBubble( playerid,String,-1,100.0,10000 );
    return true;
}
Reply
#3

What command progresser does it use?
Reply
#4

I'm using zcmd and sscanf.
Its faster than strcmp
Reply
#5

AGAIN, those dumb errors:
Quote:

C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(224) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(224) : error 017: undefined symbol "cmd_me"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(224) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(224) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

224: COMMAND:me( playerid, params[ ] )


IM SO FUCKING TIRED OF THEM!!1!1!1!!1
Reply
#6

do you have included zcmd?
Reply
#7

Yes.
Quote:

#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <dcmd>
#include <zcmd>
#include <sscanf>
static gTeam[MAX_PLAYERS];

Reply
#8

hmm.
This is strange,meybe try:

pawn Код:
#include "../pawno/include/zcmd.inc"
Reply
#9

It says I didnt define it..
Reply
#10

../pawno/include/zcmd.inc(62) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
../pawno/include/zcmd.inc(64) : error 017: undefined symbol "funcidx"
../pawno/include/zcmd.inc(64) : warning 215: expression has no effect
../pawno/include/zcmd.inc(64) : error 001: expected token: ";", but found ")"
../pawno/include/zcmd.inc(64) : error 029: invalid expression, assumed zero
../pawno/include/zcmd.inc(64) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#11

Try put include after a_samp.inc

pawn Код:
#include <a_samp>
#include "../pawno/include/zcmd.inc"
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <dcmd>
#include <sscanf>
static gTeam[MAX_PLAYERS];
Reply
#12

Those. C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(222) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(222) : error 017: undefined symbol "cmd_me"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(222) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(222) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Man, fuck this shit, give me your empty gamemode where it works please.
Reply
#13

Okey where you puting this command?
Reply
#14

public OnPlayerCommandText(playerid, cmdtext[])
{
COMMAND:me(playerid, params[] )
{
new
Name[ MAX_PLAYER_NAME ],
String[ 128 ],
Text[ 70 ]
;
GetPlayerName( playerid,Name,MAX_PLAYER_NAME );
if( sscanf( params,"s[70]",Text ) ) return SendClientMessage( playerid,-1,"Usage /me text" );

format( String,sizeof( String ),"* %s %s",Name,Text );
SetPlayerChatBubble( playerid,String,-1,100.0,10000 );
return true;
}
return 1;
}
Reply
#15

Including zcmd with dcmd doesn't work and will not mix. Experiment with it if you don't believe me. A simple fix is to get your command converted to strcmp/dcmd, or just remove the #include <dcmd> and all of the DCMD commands.

EDIT: ZCMD commands DO NOT WORK UNDER ONPLAYERCOMMANDTEXT!
Reply
#16

Ech damn bro.

Put command at the end of script but not in the callback.
Reply
#17

When I placed it out the callback I got those.

C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(221) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(235) : error 010: invalid function or declaration
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(237) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(237) : warning 203: symbol is never used: "IsNumeric"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(237) : warning 203: symbol is never used: "ReturnUser"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(237) : warning 203: symbol is never used: "gTeam"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#18

C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(221) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(235) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(235) : warning 203: symbol is never used: "IsNumeric"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(235) : warning 203: symbol is never used: "ReturnUser"
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(235) : warning 203: symbol is never used: "gTeam"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


I removed the last:

return1:. and I only got one error left.
Reply
#19

Show me


pawn Код:
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(221) : error 029: invalid expression, assumed zero
C:\Users\Mijn pc\Desktop\NYC\gamemodes\LOCALCHAT.pwn(235) : error 010: invalid function or declaration
Lines.
Reply
#20

Ffs... if you were to even read the lines in which the errors are on, you would know that it has nothing to do with your command.

Quote:
Originally Posted by Schurman
Посмотреть сообщение
Including zcmd with dcmd doesn't work and will not mix. Experiment with it if you don't believe me. A simple fix is to get your command converted to strcmp/dcmd, or just remove the #include <dcmd> and all of the DCMD commands.

EDIT: ZCMD commands DO NOT WORK UNDER ONPLAYERCOMMANDTEXT!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)