24.06.2011, 13:16
Hi. I have made this:
The problem is , no matter what I type it will return "you can';t use these charactors".
Anyone know the problem?
Oh and also , my friend wanted to ask this question. I tried to tell him myself(in fact, i don't know for sure either)
Textdrawshowforall is not needed with textdrawsetstring ? I don't think so , as 1. it is showing it to all, not just a player. 2. it just sets the text string.
Thanks!
pawn Код:
dcmd_news(playerid,params[])
{ if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE, "SERVER: Unknown command.");
{
if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"Usage: /news [text]");
if(strlen(params) >30) return SendClientMessage(playerid,COLOR_RED,"You can only use a maximun of 30 charactors!");
if(strfind(params,"/") != -1 || strfind(params,":")!= -1 || strfind(params,"?")!= -1 || strfind(params,"<")!= -1 || strfind(params,">")!= -1 ||
strfind(params,"|")!= -1 || strfind(params,"\\")!= -1 || strfind(params,"*") || strfind(params,"\"")!= -1)
return SendClientMessage(playerid,COLOR_RED,"You can't use these charactors!");
else
{
TextDrawSetString(Textdraw1,params);
}
return 1;
}
}
Anyone know the problem?
Oh and also , my friend wanted to ask this question. I tried to tell him myself(in fact, i don't know for sure either)
Textdrawshowforall is not needed with textdrawsetstring ? I don't think so , as 1. it is showing it to all, not just a player. 2. it just sets the text string.
Thanks!