23.02.2010, 23:00
ok now i get an error that says that i have if but not ; chack please
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { { new cmd[256]; new tmp[256]; new Message[256]; new gMessage[256]; new pName[MAX_PLAYER_NAME+1]; new iName[MAX_PLAYER_NAME+1]; new idx; new string[256]; new playermoney; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new playername[MAX_PLAYER_NAME]; cmd = strtok(cmdtext, idx) if(strcmp(cmd, "/ooc", true,4) == 0 || strcmp(cmd, "/o", true,2) == 0) if(gPlayerLogged[playerid] == 0)return SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); GetPlayerName(playerid, sendername, sizeof(sendername)); new space=strfind(cmdtext," "); if(!strlen(cmdtext[space])||(space==-1))return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]"); format(string, sizeof(string), "(( %s: %s ))", sendername, cmdtext[space]); printf("%s", cmdtext[space]); return 1; } }