Need help with chat!
#1

Hey guys hope everything's fine
I'm in big trouble and need help for it as soon as possible.
first when i type /setsay and what ever i type here for example /setsay nigga
so now when i use /say hey whats up.
Then it should show like this " Redbull<nigga>hey whats up " without the quotes
Like this see?
if u still don't understand u can tell me
remember where redbull is written it should be the player name not redbull
Thanks in advance

if u still don't get me plz message me in reply Thanks
Need it on urgent basis
Reply
#2

okay when he type /say hey guys or just /say then it shows REDBULL[GD] <yo yo> Hey Guys?
Reply
#3

Quote:
Originally Posted by superrobot48
Посмотреть сообщение
okay when he type /say hey guys or just /say then it shows REDBULL[GD] <yo yo> Hey Guys?
first when i type /setsay and what ever i type here for example /setsay nigga
so now when i use /say hey whats up.
Then it should show like this " Redbull<nigga>hey whats up " without the quotes
Like this see?
if u still don't understand u can tell me
remember where redbull is written it should be the player name not redbull
Thanks in advance
Reply
#4

Quote:
Originally Posted by superrobot48
Посмотреть сообщение
okay when he type /say hey guys or just /say then it shows REDBULL[GD] <yo yo> Hey Guys?
When he type /say Hey guys
Reply
#5

Add this on top of ur script
Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>

new SetSay[MAX_PLAYERS];
add this somewhere
Код:
CMD:setsay(playerid, params[])
{
    new setsay[64];
    if(sscanf(params,"sz",setsay)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /setsay <text>");
    SetSay = setsay;
    return 1;
}


CMD:say(playerid, params[])
{
    new string[128],msg[256],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    format(string,sizeof(string),"*%s <%s> %s",pname,SetSay,msg);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 1;
}
Reply
#6

Quote:
Originally Posted by superrobot48
Посмотреть сообщение
Add this on top of ur script
Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>

new SetSay[MAX_PLAYERS];
add this somewhere
Код:
CMD:setsay(playerid, params[])
{
    new setsay[64];
    if(sscanf(params,"sz",setsay)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /setsay <text>");
    SetSay = setsay;
    return 1;
}


CMD:say(playerid, params[])
{
    new string[128],msg[256],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    format(string,sizeof(string),"*%s <%s> %s",pname,SetSay,msg);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 1;
}
Awesome !!!! bro!!!!
But can u tell me that how can i do this.

i m using ladmin and i want these both commands to be usable with level 1 admin to level 5 how can i do this?

Rep+++++
Reply
#7

Quote:
Originally Posted by RedbullGD
Посмотреть сообщение
Awesome !!!! bro!!!!
But can u tell me that how can i do this.

i m using ladmin and i want these both commands to be usable with level 1 admin to level 5 how can i do this?

Rep+++++
Listen, Press CTRL+F and search for admin chat i need to see your top code which checks player is admin or not.

Example:-
pawn Код:
if(PlayerInfo[playerid][Level] > 1)
Reply
#8

Please stop giving ready made code.

Did he learnt something ? Don't think so.
Reply
#9

Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
Listen, Press CTRL+F and search for admin chat i need to see your top code which checks player is admin or not.

Example:-
pawn Код:
if(PlayerInfo[playerid][Level] > 1)
hey bro can u help me with this

i used this script


Код:
#include <IsPlayerLAdmin>
#include <a_samp>
#include <zcmd>
#include <sscanf>

//COLOURS

#define COLOR_PINK 0xCD0C76FF
#define COLOR_LIME 0x00FF00FF
#define COLOR_RED 0xFF0000FF


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Say script by Redbull loaded successfully");
	print("--------------------------------------\n");
	return 1;
	

}

public OnFilterScriptExit()
{
	return 1;
}



main()
{
	print("\n----------------------------------");
	print(" Script by redbull unloaded successfully");
	print("----------------------------------\n");
}


new SetSay[MAX_PLAYERS];

CMD:settext(playerid, params[])
{
    new setsay[64];
    if(sscanf(params,"sz",setsay)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /settext <text>");
    SendClientMessage(playerid,COLOR_LIME, "Successfully saved");
    SetSay = setsay;
    return 1;
}


CMD:say(playerid, params[])
{
    new string[128],msg[256],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_LIME, "USAGE: /say <text>");
    format(string,sizeof(string),"*%s <%s> %s",pname,SetSay,msg);
    SendClientMessageToAll(COLOR_PINK,string);
    return 1;
}



public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}
but when i change my text to anyother using /settext
it changed for all the player not only me plz fix it and urgent
Reply
#10

Quote:
Originally Posted by superrobot48
Посмотреть сообщение
Add this on top of ur script
Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>

new SetSay[MAX_PLAYERS];
add this somewhere
Код:
CMD:setsay(playerid, params[])
{
    new setsay[64];
    if(sscanf(params,"sz",setsay)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /setsay <text>");
    SetSay = setsay;
    return 1;
}


CMD:say(playerid, params[])
{
    new string[128],msg[256],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    format(string,sizeof(string),"*%s <%s> %s",pname,SetSay,msg);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 1;
}
hey bro can u help me with this

i used your script


Код:
#include <IsPlayerLAdmin>
#include <a_samp>
#include <zcmd>
#include <sscanf>

//COLOURS

#define COLOR_PINK 0xCD0C76FF
#define COLOR_LIME 0x00FF00FF
#define COLOR_RED 0xFF0000FF


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Say script by Redbull loaded successfully");
	print("--------------------------------------\n");
	return 1;
	

}

public OnFilterScriptExit()
{
	return 1;
}



main()
{
	print("\n----------------------------------");
	print(" Script by redbull unloaded successfully");
	print("----------------------------------\n");
}


new SetSay[MAX_PLAYERS];

CMD:settext(playerid, params[])
{
    new setsay[64];
    if(sscanf(params,"sz",setsay)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /settext <text>");
    SendClientMessage(playerid,COLOR_LIME, "Successfully saved");
    SetSay = setsay;
    return 1;
}


CMD:say(playerid, params[])
{
    new string[128],msg[256],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_LIME, "USAGE: /say <text>");
    format(string,sizeof(string),"*%s <%s> %s",pname,SetSay,msg);
    SendClientMessageToAll(COLOR_PINK,string);
    return 1;
}



public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}
but when i change my text to anyother using /settext
it changed for all the player not only me plz fix it and urgent
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)