public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
switch(success)
{
case 0:
{
new str[128];
//format(string, sizeof(string),"The command '%s' is not in the server database try using (/help).", cmdtext);
//return SendClientMessage(playerid,COLOR_WHITE,string);
format(str, sizeof(str), "The command '%s' is not in the server database try using (/help).", cmdtext);
Cmddraw1 = TextDrawCreate(28.000000, 435.000000, str);
TextDrawBackgroundColor(Cmddraw1, 255);
TextDrawFont(Cmddraw1, 1);
TextDrawLetterSize(Cmddraw1, 0.500000, 1.000000);
TextDrawColor(Cmddraw1, -10270806);
TextDrawSetOutline(Cmddraw1, 0);
TextDrawSetProportional(Cmddraw1, 1);
TextDrawSetShadow(Cmddraw1, 1);
TextDrawSetSelectable(Cmddraw1, 0);
TextDrawShowForPlayer(playerid, Cmddraw1);
TextDrawShowForPlayer(playerid, Cmddraw0);
SetTimer("Unkowncmdtimer", 5000, true);
forward Unkowncmdtimer(playerid);
public Unkowncmdtimer(playerid)
{
TextDrawHideForPlayer(playerid, Cmddraw1);
TextDrawHideForPlayer(playerid, Cmddraw0);
return 1;
}
Ah, a playerid! You should use SetTimerEx which allows you to include the playerid. Check the wiki, it contains an example with a playerid. Let me know if it works for you!
|