18.06.2013, 14:09
I need a little help! My CMD's are not working - if I use them, I get no error - and when compiling no error too. No errors in console too.
Code of the commands:
Code of the commands:
Код:
//ALL THE BASIC CMDS (IMPORTANT ONES) CMD:me(playerid, params[]) { new string[128], action[100]; if(sscanf(params, "s[100]", action)) { SendClientMessage(playerid, -1, "USAGE: /me [action]"); return 1; } else { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); format(string, sizeof(string), "* %s %s",pName, action); } return 1; } CMD:do(playerid, params[]) { new string[128], action[100]; if(sscanf(params, "s[100]", action)) { SendClientMessage(playerid, -1, "USAGE: /do [action]"); return 1; } else { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); format(string, sizeof(string), "* %s ((%s))",action, pName); } return 1; } // This shouldn't be inside ANY function. I personally insert mine BELOW OnGameModeInit - Not within it. CMD:adminroof(playerid) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1847.7333,-1761.9608,13.5469)) { SetPlayerPos(playerid, 1889.0286,-1782.9777,25.7911);//Naar boven SetPlayerInterior(playerid, 0); SendClientMessage(playerid, COLOR_GREEN, "*You use the elevator to get on the roof*"); return 1; } SendClientMessage(playerid,0xFFFFFF00,"DEBUG: Not in range!"); return 1; } CMD:admindown(playerid) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1889.0286,-1782.9777,25.7911)) { SetPlayerPos(playerid, 1847.7333,-1761.9608,13.5469);//Naar beneden SetPlayerInterior(playerid, 0); SendClientMessage(playerid, COLOR_GREEN, "*You use the elevator to get down from the roof*"); return 1; } SendClientMessage(playerid,0xFFFFFF00,"DEBUG: Not in range!"); return 1; }