13.08.2014, 00:35
Hello, before the thread sorry for my bad english but i try my best 
So I made my first system to command /me, i saw some in the Internet but i decide to do my own, but I can't put it working, when I try /me the server says " Unknown Command" btw the /me is local, if someone could help me with the warnings and put this working I would apreciate
So here it goes the code:
The Warnings are:
Sorry if the system is too bad, but I'm a newbie in pawno, and I'm trying hard

So I made my first system to command /me, i saw some in the Internet but i decide to do my own, but I can't put it working, when I try /me the server says " Unknown Command" btw the /me is local, if someone could help me with the warnings and put this working I would apreciate

So here it goes the code:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) if(IsPlayerConnected(playerid)) { new Float: radi, Float: str; new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); if (!strcmp(cmdtext, "/me", true, 3)) { if(!cmdtext[3])return SendClientMessage(playerid, vermelho, "Usa: /me [Aзгo]"); // Usa: /me Aзгo = [EN] Use: /me Action new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SendClientMessage(i, roxo, "str"); } { return 0; } return 0; } }
Quote:
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(41) : warning 217: loose indentation C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(44) : warning 219: local variable "str" shadows a variable at a preceding level C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(51) : warning 217: loose indentation C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(55) : warning 225: unreachable code C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(55) : warning 217: loose indentation C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(26) : warning 203: symbol is never used: "str" C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(26 -- 61) : warning 209: function "OnPlayerCommandText" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Warnings. |
