OnPlayerText Help -
Vege - 11.09.2013
Код:
if(text[0] == '#' && PlayerInfo[playerid][gleader] == 1) {
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[1]);
MessageToGang(0x8000FFC8,string);
return 0;
}
Ok so, this is the code for my GM's gang leader(s) chat and I want it to ##[text] for gang members chat
Couldnt get anything on samp forum so I am posting here for help
For Example My gang members chat should be like this or whatever
Код:
if(text[0] == '##' && PlayerInfo[playerid][gleader] == 1) {
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[1]);
MessageToGang(0x8000FFC8,string);
return 0;
}
But this gives error.
Any kind of help would be appreciated.
Plus I am noob at scripting and I want Help for a command that could write anything in the textdraw box.
I am using Arakuta's SendBoxMsg!
This is just a side thing if any help is given I would be really Happy!
Re: OnPlayerText Help -
[HK]Ryder[AN] - 11.09.2013
try this
pawn Код:
if(text[0] == '#' && text[1] == '#' && PlayerInfo[playerid][gleader] == 1) {
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[1]);
MessageToGang(0x8000FFC8,string);
return 0;
}
Re: OnPlayerText Help -
Jefff - 11.09.2013
pawn Код:
GetPlayerName(playerid,string,MAX_PLAYER_NAME);
format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[2]);
Re: OnPlayerText Help -
Vege - 11.09.2013
Quote:
Originally Posted by [HK]Ryder[AN]
try this
pawn Код:
if(text[0] == '#' && text[1] == '#' && PlayerInfo[playerid][gleader] == 1) { new string[128]; GetPlayerName(playerid,string,sizeof(string)); format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[1]); MessageToGang(0x8000FFC8,string); return 0; }
|
it gets compiled but doesnt works
Re: OnPlayerText Help -
Vege - 11.09.2013
anyone?
Respuesta: OnPlayerText Help -
Swedky - 11.09.2013
pawn Код:
if(text[0] == '#' && text[1] == '#' && PlayerInfo[playerid][gleader] == 1) {
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[1]);
MessageToGang(0x8000FFC8,string);
return 1; // Return 1 (?.
}
Re: OnPlayerText Help -
Konstantinos - 11.09.2013
Does anybody read that post at all?
The solution is here and you seem to ignore it.
Quote:
Originally Posted by Jefff
pawn Код:
GetPlayerName(playerid,string,MAX_PLAYER_NAME); format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[2]);
|
Re: OnPlayerText Help -
Vege - 12.09.2013
Not a single thing in this post is working!
the pwn gets compiled but when I try to talk usin ##[text] ingame it doesnt happen!
Oh and I forgot to notify that I am using #[text] for gang leaders Chat!
Re: OnPlayerText Help -
[HK]Ryder[AN] - 12.09.2013
I guess this should work
pawn Код:
if(text[0] == '#' && text[1] == '#' && PlayerInfo[playerid][gleader] == 1) {
new string[128]; GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Gang.Chat:[%i]%s: %s",playerid,string,text[2]);
MessageToGang(0x8000FFC8,string);
return 0;
}