How to PlayerActionMessage when typing a /cmd
#1

Hello everyone. As you see I want to know which variables do I need to put when someone types a cmd for example /calculator it appears an action as the player is using the calculator? Thank you, I will rep +
Reply
#2

pawn Код:
CMD:calculator(playerid, params[])
{
new name[128],str[128];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str),"%s Has opened the calculator to Do some sums", name);
SendClientMessage(-1,str);
return 1;
)
Using Zcmd
Reply
#3

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
pawn Код:
CMD:calculator(playerid, params[])
{
new name[128],str[128];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str),"%s Has opened the calculator to Do some sums", name);
SendClientMessage(-1,str);
return 1;
)
Using Zcmd
You're wasting 104 cells.
Use new name[24] or MAX_PLAYER_NAME instead.
Reply
#4

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
pawn Код:
CMD:calculator(playerid, params[])
{
new name[128],str[128];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str),"%s Has opened the calculator to Do some sums", name);
SendClientMessage(-1,str);
return 1;
)
Using Zcmd
Ty bro, will try it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)