/me [text] the text comes above your head -
davelord - 22.04.2011
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
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
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;
}
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
What command progresser does it use?
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
I'm using zcmd and sscanf.
Its faster than strcmp
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
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
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
do you have included zcmd?
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
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];
|
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
hmm.
This is strange,meybe try:
pawn Код:
#include "../pawno/include/zcmd.inc"
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
It says I didnt define it..
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
../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
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
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];
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
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.
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
Okey where you puting this command?
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
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;
}
Re: /me [text] the text comes above your head -
SchurmanCQC - 22.04.2011
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!
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
Ech damn bro.
Put command at the end of script but not in the callback.
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
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.
Re: /me [text] the text comes above your head -
davelord - 22.04.2011
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.
Re: /me [text] the text comes above your head -
Raimis_R - 22.04.2011
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.
Re: /me [text] the text comes above your head -
SchurmanCQC - 22.04.2011
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!
|