07.06.2010, 12:20
Aww here you go :
With the above code: You have to type the accent name everytime you speak with /accent.
Код:
if(!strcmp(cmdtext,"/accent",true,7)) { new tmp[128],tmp2[256],Index,string[256]; tmp=strtok(cmdtext,Index); tmp2=strtok(cmdtext,Index); if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid,0xffffffaa,"USAGE: /accent accentname text"); if(!strcmp(tmp,"gangsta",7)) { format(string,sizeof(string)," %s says: [Gansta Accent] %s",playername,tmp); // replace the playername with your player name variable } else(!strcmp(tmp,"mafia",5)) { format(string,sizeof(string)," %s says: [Mafia Accent] %s",playername,tmp2); // just another example on how to add accents } SendClientMessageToAll(0xffffffaa,string); return 1; }