23.02.2010, 09:15
When I do "/ad" It said "USAGE: /ad [message]" But When I do "/ad Hello" It said "Bad Command blabla."
And that is the same for /an.
And /me works and is almost the same...
What is the problem?
Help please ;(
And that is the same for /an.
And /me works and is almost the same...
What is the problem?
Help please ;(
Код:
if(strcmp(cmdtext,"/an",true)==0) { new pName[MAX_PLAYER_NAME]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /an [text]"); if(IsPlayerConnected(playerid)) { GetPlayerName(playerid,pName,sizeof(pName)); format(string,sizeof(string),"[ADMIN ANNOUNCE] %s: %s",pName,cmdtext[7]); SendClientMessageToAll(COLOR_BLUE,string); } return 1; } if(strcmp(cmdtext,"/me",true)==0) { new pName[MAX_PLAYER_NAME]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /me [action]"); if(IsPlayerConnected(playerid)) { GetPlayerName(playerid,pName,sizeof(pName)); format(string,sizeof(string),"%s %s",pName,cmdtext[7]); SendClientMessageToAll(COLOR_WHITE,string); } return 1; } if(strcmp(cmdtext,"/ad",true)==0) { new pName[MAX_PLAYER_NAME]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /ad [message]"); if(IsPlayerConnected(playerid)) { if (GetPlayerMoney(playerid) >= 499) SendClientMessage(playerid,COLOR_RED,"You don't have 500$"); } GetPlayerName(playerid,pName,sizeof(pName)); format(string,sizeof(string),"Advertisement: %s by [%s]",cmdtext,pName[7]); SendClientMessageToAll(COLOR_ORANGE,string); GivePlayerMoney(playerid, -500); SendClientMessage(playerid,COLOR_ORANGE,"Your AD costed $500"); return 1; }