Update Send Client message
#1

Hello Guys! I want to ask if i can update the same client message but with different words.
EXAMPLE:
CHAT:Blablabla
Blablabla
Detected for using Aimbot [WARINGS:1/10]
Update message by deleting Detected for using Aimbot [WARINGS:1/10] and changing it to Detected for using Aimbot [WARINGS:2/10]
Reply
#2

Use the function format for these kind of things.

https://sampwiki.blast.hk/wiki/Format
Reply
#3

Can you explain me more ?
Reply
#4

yes its possible

PHP код:
#define MAX_WARNS   10 //change the 10 to the amount of warnings you want to give a player
enum PlayerInfo
{
    
aimWarns
}
new 
pInfo[MAX_PLAYERS][PlayerInfo];
//under where you detect the aimbot add this code
new astring [128];
pInfo[id][aimWarns]++;
 
format(astring,sizeof(astring),"[AdmCmd]: {FF6347}Player %s has been detected for using aimbot | Warnings: %d/%d |",GetName(id),pInfo[id][aimWarns],MAX_WARNS);
SendClientMessageToAll(red,astring); 
Try using this piece of coding
Reply
#5

YOu Understand me wrong i want something like:

EXAMPLE:
CHAT:Blablabla
Blablabla
Detected for using Aimbot [WARINGS:1/10]

WHEN IT GIVES THE SECOND WARING

EXAMPLE:
CHAT:Blablabla
Blablabla
Detected for using Aimbot [WARINGS:1/10]//DOnt show this but change it to
Detected for using Aimbot [WARINGS:2/10]
Reply
#6

Quote:
Originally Posted by Xportaler
Посмотреть сообщение
YOu Understand me wrong i want something like:

EXAMPLE:
CHAT:Blablabla
Blablabla
Detected for using Aimbot [WARINGS:1/10]

WHEN IT GIVES THE SECOND WARING

EXAMPLE:
CHAT:Blablabla
Blablabla
Detected for using Aimbot [WARINGS:1/10]//DOnt show this but change it to
Detected for using Aimbot [WARINGS:2/10]
the coding that i give to you will update its self each time the player gets a warning , so it will be [1/10] on first warning the [2/10] and keeps counting up until it reaches [10/10]
Reply
#7

It will make a Spam in chat like:

Detected for using Aimbot [WARINGS:1/10]
Detected for using Aimbot [WARINGS:2/10]
....
Detected for using Aimbot [WARINGS:9/10]
Detected for using Aimbot [WARINGS:10/10]
Reply
#8

No, client messages are client-sided as the native says. You can't change them, but display them in the textdraw.
Reply
#9

Do i have another way to change message ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)