07.02.2009, 11:22
The first one is:
The /me commando, when we use it, it saying it 2 times for others, not me, but for others.
The other is the /o(a chat for all), trying to make a command so i can take it on and off, but i cant it work.
No errors at all..
Thank you for your time...
The /me commando, when we use it, it saying it 2 times for others, not me, but for others.
Code:
if(!strcmp(cmdtext, "/me", true, 3)) { if(cmdtext[3] == 0) { SendClientMessage(playerid, COLOR_YELLOW, "BRUK: /me tekst"); return 1; } new str[128], Float:Pos[3]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); for(new i = 0; i < MAX_PLAYERS; i++){ if(PlayerToPoint(40.0, i, Pos[0], Pos[1], Pos[2])){ SendClientMessageToAll(COLOR_YELLOW, str); } } return 1; }
Code:
new OOC; if(!strcmp(cmdtext, "/ooc", true, 4)) { if(GetPlayerScore(playerid) == 11) { OOC = cmdtext[4]; SendClientMessageToAll(COLOR_YELLOW, "!!OOC!!"); } return 1; } if( !strcmp("/o", cmdtext, true, 2) ) { new str[256], pname[256]; if(!OOC == true) { SendClientMessageToAll(COLOR_WHITE, "OOC kannalen er av!"); } else { GetPlayerName(playerid, pname, 256); format(str, 256, "OOC %s sier: (( %s ))", pname, cmdtext[3]); SendClientMessageToAll(COLOR_WHITE, str); } return 1; }
Thank you for your time...