28.03.2008, 23:56
Quote:
Originally Posted by jthebeast2007
They are functions you can use like in a command for example:
Code:
At the top of your script: new gang[MAX_PLAYERS]; Under OnPlayerCommandText: new cmd[256],idx; cmd = strtok(cmdtext,idx); if(strcmp(cmd,"/gangcreate",true) == 0) { new tmp[256]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,red,"USAGE: /gangcreate [gang name]"); return 1; new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); CreateGang(tmp,name); format(string,sizeof(string),"You have successfully created the %s gang",tmp); SendClientMessage(playerid,yellow,string); return 1; } |