PDA

View Full Version : Help With AScript


Rafaeloo
18/10/2015, 10:52 AM
i have a script for admin aduty.
when admin is going aduty to tell all players is now onduty.
Code

if(!strcmp("/aduty", cmdtext, true) && IsPlayerAdmin(playerid)) return
SendClientMessageToAll(0xFF0000AA,"SERVER: An admin is on duty.");

but i dont know when can i addd this script ?

Rafaeloo
18/10/2015, 10:55 AM
+rep if u help me

AndySedeyn
18/10/2015, 11:05 AM
It belongs in the body of the OnPlayerCommandText callback.

Read more about the callback on the WIKI page: http://wiki.sa-mp.com/wroot/index.php?title=OnPlayerCommandText

Rafaeloo
18/10/2015, 11:07 AM
i dont have that commnd on my rolepla script
OnPlayerCommandText

AndySedeyn
18/10/2015, 11:09 AM
That means the gamemode you are editing is using a command processing library. (I)-ZCMD, DCMD, Y_Commands,...

J0sh...
18/10/2015, 11:10 AM
That means the gamemode you are editing is using a command processor library. (I)-ZCMD, DCMD, Y_Commands,...

Not DCMD, because DCMD uses OnPlayerCommandText.

Rafaeloo
18/10/2015, 11:10 AM
and how to make it ?

Rafaeloo
18/10/2015, 11:17 AM
how to make it ? with horizon roleplay script ?