Simple help needed!
#1

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(GetPlayerWeapon(playerid) == 33 && kickgun[playerid] == 1) {
	SendClientMessage(damagedid,COLOR_RED, "You have been kicked by The Quake Industries Shotgun for AFK.");
	Kick(damagedid);
	}
	return 1;
}
How would I make that display a sentance for everybody like "SOANDSO has been kicked by the shotgun for AFK" on SENDCLIENTMESSAGETOALL
Reply
#2

Change 'SendClientMessage' to 'SendClientMessageToAll'
Reply
#3

Hmm is this from HBG's Script? josh Quake is the one who added the Quake industries thing
Reply
#4

yeah, I said to make it so it shows the name. Who was kicked. How wud I do this?
Reply
#5

If u want to make all then yeah
Код:
SendClientMessageAll
Or
Код:
SendClientMessageToAll
Don't remember one of those xD.
Reply
#6

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    new string[256], pName[MAX_PLAYER_NAME];
    if(GetPlayerWeapon(playerid) == 33)
    {
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string),"%s have been kicked by The Quake Industries Shotgun for AFK", pName);
        SendClientMessageToAll(-1, string);
        Kick(damagedid);
    }
    return 1;
}
Reply
#7

How do I add "COLOR_RED" to that script, I can't add it without it erroring on me for some reason.

Код:
SendClientMessageToAll(-1, COLOR_RED, string);
That errors, anyone correct it please.
Reply
#8

#define COLOR_RED 0xff0000ff

at the start of your script

hope it helped ^^
Reply
#9

SendClientMessageToAll(COLOR_RED, string);
should from format
exemple:
pawn Код:
new string[128];
format(string,sizeof(string), "hello man",string);
SendClientMessageToAll(COLOR_RED, string);
Reply
#10

* DaRkM blushes.

<3

- Josh Quake
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)