06.03.2018, 12:35
hi guys, i want to ask you how to do when player is near object and for example if players destroy some object all players gets money who was near what object.
i doing somethink like this but i get warning all the time with positions.
i doing somethink like this but i get warning all the time with positions.
Код HTML:
error 028: invalid subscript (not an array or too many subscripts): "x8"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
new Float:x8, Float:y8, Float:z8;
GetObjectPos(Object_ID, x8[0], y8[1], z8[2]);
if (IsPlayerInRangeOfPoint(playerid, 7.0, x8[0], y8[1], z8[2]))
{
for(new p; p < MAX_PLAYERS; p++)
{
if(!IsPlayerConnected(p) || IsPlayerNPC(p)) continue;
GivePlayerMoneyA(p, 150);
}
}
error line: GetObjectPos(Object_ID, x8[0], y8[1], z8[2]);


I hope he learns from these codes.