03.01.2012, 19:21
Estou Criando Um servidor e estou precisando desses comandos quem poder Passar ^^
CMD:eu(playerid,params[])
{
new texto, Float:PPos[3], nome[24];
if(sscanf(params, "s[100]", texto)) return SendClientMessage(playerid, -1, "USO: /eu {00E5FF}[Motivo]");
GetPlayerPos(playerid, PPos[0], PPos[1], PPos[2]);
GetPlayerName(playerid, nome, 24);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i, /*Distancia da mensagem*/, PPos[0], PPos[1], PPos[2])
{
new string[124];
format(string, 124, "%s %s", nome, texto);
SendClientMessage(i, -1, string);
}
}
return 1;
}
if(IsPlayerInRangeOfPoint(i, /*Distancia da mensagem*/, PPos[0], PPos[1], PPos[2])
//Coloque no OnPlayerCommandText:
if(strfind(cmdtext, "/eu", true) == 0)
{
if(cmdtext[3] == 0 || cmdtext[3] == 32)
{
if(cmdtext[3] != 32 || (cmdtext[4] == 0 && cmdtext[3] == 32)) return SendClientMessage(playerid, 0xFFFFFFAA, "Comando: /eu [texto]");
new NickName[MAX_PLAYER_NAME];
new Float:P_Pos[3];
GetPlayerName(playerid, NickName, MAX_PLAYER_NAME);
GetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
format(cmdtext, 128, "%s %s.", NickName, cmdtext[4]);
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(IsPlayerInRangeOfPoint(x, 7.0, P_Pos[0], P_Pos[1], P_Pos[2]))
{
SendClientMessage(x, 0x33CCFFAA, cmdtext);
}
}
return true;
}
}
if(strfind(cmdtext, "/do", true) == 0)
{
if(cmdtext[3] == 0 || cmdtext[3] == 32)
{
if(cmdtext[3] != 32 || (cmdtext[4] == 0 && cmdtext[3] == 32)) return SendClientMessage(playerid, 0xFFFFFFAA, "Comando: /do [aзгo]");
new NickName[MAX_PLAYER_NAME];
new Float:P_Pos[3];
GetPlayerName(playerid, NickName, MAX_PLAYER_NAME);
GetPlayerPos(playerid, P_Pos[0], P_Pos[1], P_Pos[2]);
format(cmdtext, 128, "%s estб fazendo %s.", NickName, cmdtext[4]);
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(IsPlayerInRangeOfPoint(x, 7.0, P_Pos[0], P_Pos[1], P_Pos[2]))
{
SendClientMessage(x, 0x33CCFFAA, cmdtext);
}
}
return true;
}
}
Los, mas nisso:
pawn Код:
|
if(IsPlayerInRangeOfPoint(i, 5.0, PPos[0], PPos[1], PPos[2])
AH, e se chama const? Nгo sabia. Entгo tб valeu.
|
C:\Documents and Settings\Usuario\Desktop\Iniciante\gamemodes\DM.pwn(378) : warning 203: symbol is never used: "eu" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Код:
C:\Documents and Settings\Usuario\Desktop\Iniciante\gamemodes\DM.pwn(378) : warning 203: symbol is never used: "eu" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |