Need help urgent!!! Plz
#1

Hello guys i need urgent help on this.
I want a script which makes me chat like this.
RedbullGD/The player name <yo yo or whatever i want here> Hey or what ever i type
so for the yoyo section i want a command to change it to what ever i want and that command is /settext
and the hey section i want to type anything.
So what basically i need is a script that lets me have a tag or something see?
Plz help if u don't understand me plz reply
Reply
#2

Can you please explain more??
Reply
#3

He wants something like this
Код:
public OnPlayerText(playerid, text[])
{
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "[RedbullGD]%s %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    return 1;
}
And he can change the "RedbullGD" to anything eles
maybe with a command like /changeprefix ?

Код:
Correct me if im wrong.
Reply
#4

this
pawn Код:
#include <a_samp>
#include <sscanf2>
#include <zcmd>

new ptag[100][MAX_PLAYERS];

cmd:settag(playerid,parmas[])
{
new stag[100];
if(sscanf(params,"s[100]",stag))return SendClientMessage(playerid,-1,"{ff0000}/settag Desired_Tag");
format(ptag[100][playerid],100,"%s",stag);
return 1;
}

public OnPlayerText(playerid,text)
{
new name[128],mess[200];
GetPlayerName(playerid,name,128);
foramt(mess,sizeof(mess),"{00FFFF}%s{FFFF00}<%s>{FFFFFF}%s",name,ptag[100][playerid],text);
SendClientMessageToAll(-1,mess);
return 1;
}
Reply
#5

Try this

Код:
//At the top of your script
new yoyoprefix[MAX_PLAYERS];
new redbullprefix[MAX_PLAYERS];
Код:
CMD:setyoyoprefix(playerid, params[])
{
	if(!IsPlayerConnected(playerid) return SendClientMessage(playerid, -1, "Your Message here when player is not connected!");
	yoyoprefix[playerid] = 1;
	redbullprefix[playerid] = 0;
	SendClientMessage(playerid, -1, "You have set your prefix to yoyo. Everytime you talk you have [YOYO] at your name);
	return 1;
}

CMD:setredbullprefix(playerid, params[])
{
    if(!IsPlayerConnected(playerid) return SendClientMessage(playerid, -1, "Your Message here when player is not connected!");
    redbullprefix[playerid] = 1;
    yoyoprefix[playerid] = 0;
    SendClientMessage(playerid, -1, "You have set your prefix to RedBull. Everytime you talk you have [RedBull] at your name);
}
Add this below OnPlayerText:

Код:
if(yoyoprefix[playerid] == 1)
{
	new name[MAX_PLAYER_NAME];
	new str[128];
	GetPlayerName(playerid, name, 30);
	format(str, sizeof(str), "[YOYO] %s says: %s", name, text);
	SendClientMessageToAll(-1, str);
	return 0;
}

if(redbullprefix[playerid] == 1)
{
	new name[MAX_PLAYER_NAME];
	new str[128];
	GetPlayerName(playerid, name, 30);
	format(str, sizeof(str), "[RedBull] %s says: %s", name, text);
	SendClientMessageToAll(-1, str);
	return 0;
}

if(redbullprefix[playerid] == 0 || yoyoprefix[playerid] == 0)
{
	new name[MAX_PLAYER_NAME];
	new str[128];
	GetPlayerName(playerid, name, 30);
	format(str, sizeof(str), "[No Prefix] %s says: %s", name, text);
	SendClientMessageToAll(-1, str);
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)