cuddly-table-7819
03/27/2023, 10:49 AMc++
new Iterator:PlayersStreamedForPlayer<MAX_PLAYERS><MAX_PLAYERS>;
public OnPlayerStreamIn(playerid, forplayerid)
{
Iter_Add(PlayersStreamedForPlayer, forplayerid, playerid);
}
public OnPlayerStreamOut(playerid, forplayerid)
{
Iter_Remove(PlayersStreamedForPlayer, forplayerid, playerid);
}
CMD:test(playerid) {
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
foreach(new i : PlayersStreamedForPlayer) {
if(!IsACop(i)) continue;
if(IsPlayerInRangeOfPoint(i, 30.0, Pos[0], Pos[1], Pos[2])) {
new str[128];
format(str, sizeof(str), "Target id was found: %i", i);
SendClientMessage(playerid, -1, str);
}
}
}cuddly-table-7819
03/27/2023, 10:49 AMc++
new Iterator:PlayersStreamedForPlayer<MAX_PLAYERS><MAX_PLAYERS>;
error:
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(484) : warning 200: symbol "PlayersStreamedForPlayer@YSII_C" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(484) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(484) : error 001: expected token: ";", but found "<"
line:
c++
Iter_Add(PlayersStreamedForPlayer, forplayerid, playerid);
error:
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30069) : warning 200: symbol "PlayersStreamedForPlayer@YSII_C" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30069) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30069) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30069) : warning 202: number of arguments does not match definition
line:
c++
Iter_Remove(PlayersStreamedForPlayer, forplayerid, playerid);
error:
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30078) : warning 200: symbol "PlayersStreamedForPlayer@YSII_C" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30078) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30078) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(30078) : warning 202: number of arguments does not match definitioncuddly-table-7819
03/27/2023, 10:49 AMc++
foreach(new i : PlayersStreamedForPlayer) {
error:
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(40846) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(40846) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(40846) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
is anybody know a way to make it work?line:
c++
foreach(new i : PlayersStreamedForPlayer) {
error:
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(40846) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(40846) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
/home/hiwyn/Documents/sampserver/gamemodes/CNR.pwn(40846) : warning 200: symbol "PlayersStreamedForPlayer@YSII_A" is truncated to 31 characters
is anybody know a way to make it work?gorgeous-tomato-73021
03/27/2023, 11:25 AMc
new
Iterator:OwnedVehicle[MAX_PLAYERS]<MAX_VEHICLES>;
Iter_Init(OwnedVehicle);
// Add vehicles to players here...
Iter_Add(OwnedVehicle[playerid], 42);
Iter_Add(OwnedVehicle[playerid], 43);
Iter_Add(OwnedVehicle[playerid], 44);
// Other code...
foreach (new vehicleid : OwnedVehicle[playerid])
{
printf("Player %d owns vehicle %d", playerid, vehicleid).
}gorgeous-tomato-73021
03/27/2023, 11:26 AMgorgeous-tomato-73021
03/27/2023, 11:26 AMsilly-electrician-10549
03/27/2023, 11:31 AMcuddly-table-7819
03/27/2023, 6:33 PMcuddly-table-7819
03/27/2023, 6:33 PMgorgeous-tomato-73021
03/27/2023, 6:34 PMgorgeous-tomato-73021
03/27/2023, 6:35 PMcuddly-table-7819
03/27/2023, 9:52 PMcuddly-table-7819
03/27/2023, 9:55 PMc++
new Iterator:PlayersStreamedForPlayer[MAX_PLAYERS]<MAX_PLAYERS>;
public OnPlayerStreamIn(playerid, forplayerid)
{
Iter_Add(PlayersStreamedForPlayer[forplayerid], playerid);
}
public OnPlayerStreamOut(playerid, forplayerid)
{
Iter_Remove(PlayersStreamedForPlayer[forplayerid], playerid);
}
CMD:test(playerid) {
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
foreach(new i : PlayersStreamedForPlayer[playerid]) {
if(!IsACop(i)) continue;
if(IsPlayerInRangeOfPoint(i, 30.0, Pos[0], Pos[1], Pos[2])) {
new str[128];
format(str, sizeof(str), "Target id was found: %i", i);
SendClientMessage(playerid, -1, str);
}
}
}gorgeous-tomato-73021
03/27/2023, 10:01 PMgorgeous-tomato-73021
03/27/2023, 10:01 PMcuddly-table-7819
03/27/2023, 10:02 PMcuddly-table-7819
03/27/2023, 10:02 PMcuddly-table-7819
03/27/2023, 10:02 PMgorgeous-tomato-73021
03/27/2023, 10:03 PMgorgeous-tomato-73021
03/27/2023, 10:03 PM