Newbie chat -
MartinJ1 - 16.04.2012
I'm wondering if anyone can bother creating a newbie chat for me
and give me the codes, just a simble /n (question) and it will be sent to the whole server in the chat...
i already have COLOR_NEWBIE so i only need someone to make the OnPlayerCommand.. THanks!
Re: Newbie chat -
FalconX - 16.04.2012
Quote:
Originally Posted by MartinJ1
I'm wondering if anyone can bother creating a newbie chat for me
and give me the codes, just a simble /n (question) and it will be sent to the whole server in the chat...
i already have COLOR_NEWBIE so i only need someone to make the OnPlayerCommand.. THanks!
|
pawn Код:
COMMAND:yourcommand(playerid, params[])
{
new tmpstring[164], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(sscanf(params, "s[128]", tmpstring))
{
SendClientMessage(ANGRY_COLOR, ERROR_RED, "ERROR: Usage /n [message]");
return 1;
}
else
{
format(tmpstring, sizeof(tmpstring), "(NEWBIE) %s: %s ", name, tmpstring);
SendClientMessageToAll(GetPlayerColor(playerid), tmpstring);
}
return 1;
}
I made this for you, try and if you have questions ask below.
-FalconX
Re: Newbie chat -
MartinJ1 - 16.04.2012
Man, thank you so freaking much!
I appriciate you for doing this. Got paypal? i'l donate to you when i get cash on my pp!
Re: Newbie chat -
FalconX - 16.04.2012
Quote:
Originally Posted by MartinJ1
Man, thank you so freaking much!
I appriciate you for doing this. Got paypal? i'l donate to you when i get cash on my pp!
|
Thank you mate. I don't help for money
-FalconX
Re: Newbie chat -
Faisal_khan - 16.04.2012
ROFL! Who donate money for just a question if is that so I would get $394 lol.
Anyway, Good luck.
Re: Newbie chat -
MartinJ1 - 16.04.2012
when i put the code inside pwano, it gives me some "undefined symbol". How do i dentifie these symbols such as "newb" "params" "strtoupper", is it like #include <params> or do i need to add them in Pawno > include then #include

Thanks!!
Re: Newbie chat -
FalconX - 16.04.2012
Quote:
Originally Posted by MartinJ1
when i put the code inside pwano, it gives me some "undefined symbol". How do i dentifie these symbols such as "newb" "params" "strtoupper", is it like #include <params> or do i need to add them in Pawno > include then #include  Thanks!!
|
I have updated the command I wrote please try copy and paste it again. Secondly you will be needing an include to fix those errors.
SScanf will fix those errors:-
https://sampforum.blast.hk/showthread.php?tid=120356
Download the include and put them in the PAWN0 directory > Includes.
-FalconX
Re: Newbie chat -
emokidx - 16.04.2012
first make sure you have the zcmd and sscanf includes in the pawno>includes folder
then add
pawn Код:
#include <zcmd>
#include <sscanf>
for undefined symbols
pawn Код:
new *name of the var/string*;
Re: Newbie chat -
Faisal_khan - 16.04.2012
Quote:
Originally Posted by emokidx111
first make sure you have the zcmd and sscanf includes in the pawno>includes folder
then add
pawn Код:
#include <zcmd> #include <sscanf>
for undefined symbols
pawn Код:
new *name of the var/string*;
|
Man explain him a little bit and what if he don't have zcmd include he is a newbie.
Re: Newbie chat -
FalconX - 16.04.2012
Quote:
Originally Posted by emokidx111
first make sure you have the zcmd and sscanf includes in the pawno>includes folder
then add
pawn Код:
#include <zcmd> #include <sscanf>
for undefined symbols
pawn Код:
new *name of the var/string*;
|
What you wrote is all useless my dear. First of all:-
pawn Код:
#include <sscanf2> // it's 2 and should be written at the top.
for undefined symbols, it's useless to make new *name of the var/string* because he can't make a new of params can he? he have to include sscanf to get rid of such errors.
You must have zcmd include as well
pawn Код:
#include <zcmd> // at the top as well
for zcmd include:
https://sampforum.blast.hk/showthread.php?tid=91354
-FalconX