19.03.2012, 07:58
i need little help with IC
that if i talk IG
only who near me will hear me
please
how make it?
that if i talk IG
only who near me will hear me
please
how make it?
stock ProxDetector(Float:radi, playerid, string[],color)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player,i)
{
if(!IsPlayerConnected(i))continue;
if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string);
}
}
stock GetName(playerid)
{
new string[MAX_PLAYER_NAME];
GetPlayerName(playerid,string,sizeof(string));
strreplace(string,'_',' ');
return string;
}
public OnPlayerText(playerid, text[])
{
new str[128];
format(string,sizeof(string),"%s says: %s",GetName(playerid),text;
ProxDetector(30.0, playerid, str, COLOR_WHITE);
return 0;
}
public OnPlayerText(playerid, text[]) stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(!IsPlayerConnected(i))continue; if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string); } { } stock GetName(playerid) { new string[MAX_PLAYER_NAME]; GetPlayerName(playerid,string,sizeof(string)); strreplace(string,'_',' '); return string; { new str[128]; format(string,sizeof(string),"%s says: %s",GetName(playerid),text; ProxDetector(30.0, playerid, str, COLOR_WHITE); return 0; }
C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(181) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(185) : error 017: undefined symbol "foreach" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(187) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(187) : error 024: "break" or "continue" is out of context C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(188) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(188) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(190) : warning 217: loose indentation C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(192) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(192) : error 017: undefined symbol "GetName" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(194) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(196) : error 017: undefined symbol "strreplace" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(198) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(198) : warning 217: loose indentation C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(200) : error 017: undefined symbol "GetName" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(200) : error 001: expected token: ",", but found ";" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(202) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(204) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(204) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(204) : error 004: function "zcmd_OnPlayerCommandText" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(206) : error 017: undefined symbol "cmdtext" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(209) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(211) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(214) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(214) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(214) : error 004: function "OnPlayerEnterVehicle" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(216) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(219) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(219) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(219) : error 004: function "OnPlayerExitVehicle" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(221) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(224) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(224) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(224) : error 004: function "OnPlayerStateChange" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(226) : error 079: inconsistent return types (array & non-array) Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
Код:
public OnPlayerText(playerid, text[]) stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(!IsPlayerConnected(i))continue; if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string); } { } stock GetName(playerid) { new string[MAX_PLAYER_NAME]; GetPlayerName(playerid,string,sizeof(string)); strreplace(string,'_',' '); return string; { new str[128]; format(string,sizeof(string),"%s says: %s",GetName(playerid),text; ProxDetector(30.0, playerid, str, COLOR_WHITE); return 0; } Код:
C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(181) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(185) : error 017: undefined symbol "foreach" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(187) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(187) : error 024: "break" or "continue" is out of context C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(188) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(188) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(190) : warning 217: loose indentation C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(192) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(192) : error 017: undefined symbol "GetName" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(194) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(196) : error 017: undefined symbol "strreplace" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(198) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(198) : warning 217: loose indentation C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(200) : error 017: undefined symbol "GetName" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(200) : error 001: expected token: ",", but found ";" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(202) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(204) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(204) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(204) : error 004: function "zcmd_OnPlayerCommandText" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(206) : error 017: undefined symbol "cmdtext" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(209) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(211) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(214) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(214) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(214) : error 004: function "OnPlayerEnterVehicle" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(216) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(219) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(219) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(219) : error 004: function "OnPlayerExitVehicle" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(221) : error 079: inconsistent return types (array & non-array) C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(224) : warning 225: unreachable code C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(224) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(224) : error 004: function "OnPlayerStateChange" is not implemented C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(226) : error 079: inconsistent return types (array & non-array) Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors. |
public OnPlayerText(playerid, text[]) stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(!IsPlayerConnected(i))continue; if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string); } } stock GetName(playerid) { new string[MAX_PLAYER_NAME]; GetPlayerName(playerid,string,sizeof(string)); strreplace(string,'_',' '); return string; } public OnPlayerText(playerid, text[]) { new str[128]; format(string,sizeof(string),"%s says: %s",GetName(playerid),text; ProxDetector(30.0, playerid, str, COLOR_WHITE); return 0; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/mycommand", true) == 0) { //do something here return 1; } return 0; }
C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(177) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(181) : error 017: undefined symbol "foreach" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(183) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(183) : error 024: "break" or "continue" is out of context C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(184) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(184) : error 017: undefined symbol "i" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(191) : error 017: undefined symbol "strreplace" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(195) : error 021: symbol already defined: "OnPlayerText" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(197) : error 017: undefined symbol "string" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(197) : error 017: undefined symbol "string" C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(197) : warning 215: expression has no effect C:\Users\User\Desktop\GangWar\gamemodes\Test.pwn(886) : error 021: symbol already defined: "GetName" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Errors.
stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(!IsPlayerConnected(i))continue; if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) SendClientMessage(i,color,string); } } stock GetName(playerid) { new string[MAX_PLAYER_NAME]; GetPlayerName(playerid,string,sizeof(string)); strreplace(string,'_',' '); return string; } public OnPlayerText(playerid, text[]) { new str[128]; format(string,sizeof(string),"%s says: %s",GetName(playerid),text; ProxDetector(30.0, playerid, str, COLOR_WHITE); return 0; }