13.07.2011, 16:50
Now Here
Код:
C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(175) : error 004: function "ProxDetector" is not implemented C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(252) : error 017: undefined symbol "cmd" C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : error 017: undefined symbol "gPlayerLogged" C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : warning 215: expression has no effect C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : error 001: expected token: ";", but found "]" C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : error 029: invalid expression, assumed zero C:\Users\Admin\Desktop\RP scripts\NHRP\NHRP.pwn(256) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
pawn Код:
public OnPlayerText(playerid, text[]) // This callback is called when the players are chatting, we will change this from normal chat to our ProxDetector :)
{
new pname[24], str[128]; // the new for the name and string the player will say
GetPlayerName(playerid, pname, 24); // Gets the name so that it displays a name and not an ID
format(str, sizeof(str), "%s Says: %s", pname, text); // The actual text, formatted into a string
ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5); // Now this is where the fun begins. 10 means the radius, playerid is, well the playerid xD, str is your string and the colors are the colors you would like to have. You can change it!
return 0; //IMPORTANT! always use return 0; otherwise it will display both normal chat AND the ProxDetector
}
pawn Код:
if(strcmp(cmd, "/me", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
return 1;
}
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "** Stranger %s **", result);
}
else
{
format(string, sizeof(string), "** %s %s **", sendername, result);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}