11.06.2010, 17:40
Quote:
Originally Posted by Varna
This script makes problems.
If i type "/mewhatsup" it will say "Firstname_Lastname hatsup" instead of "Unknown command" It sounds like a little problem which can be ignored but it makes big problems with other commands. for example i got command "/skin" but with this script it will mess with "/s" command and "/skin" wont work but will say "Firstname_Lastname shouts: kin" |
Код:
if(!strcmp(cmdtext,"/s",true,2)) { if(cmdtext[4] == " ") return SendClientMessage(playerid,"0x0000ff,"USAGE: /s text"); new str[128],name[MAX_PLAYERNAME]; GetPlayerName(playerid,name,sizeof(name)); format(str,sizeof(str),"%s [ID: %d] shouts: %s,name,playerid,cmdtext[3]) SendClientMessageToAll(0xffffffaa,str); return 1; }
Код:
if(!strcmp(cmdtext,"/skin",true,5)) { new tmp[56], skin, Index; tmp=strtok(cmdtext,Index); if(!strlen(tmp)) return SendClientMessage(playerid,0xff0000aa,"USAGE: /skin skinid"); skin=strval(tmp); if(skin<0 || skin>299) return SendClientMessage(playerid,0xffffffaa,"Invalid Skin Id); SetPlayerSkin(playerid,skin); SendClientMessage(playerid,0x00ffffaa,"You have changed your skin successfully"); return 1; }