RC5 and RC6 Bug with InRange -
piohh - 21.12.2010
I use likes old GF CrimInRange, but if any ppl are in a vehicle that dosn't work.
I have NPC Cops and if you have more then 2 Wanteds u get +1 Wanted from this Cop.
But with RC5 and RC6 thats don't work. If you leave the vehicle then u get the Wanted.
The same if a player gives via Bodyguard a ppl into a car Armor. The script don't notice this and the player is banned after he leave the vehicle...
Код:
Armor[playerid] = 1; SetPlayerArmour(playerid, 200);
SetTimerEx("ArmorCheck", 60000, 0, "i", playerid);
Re: RC5 and RC6 Bug with InRange -
DVDK - 21.12.2010
What? there is a language called English, use it.
Re: RC5 and RC6 Bug with InRange -
piohh - 21.12.2010
and which part you don't understand?
Re: RC5 and RC6 Bug with InRange -
StreetGT - 21.12.2010
Quote:
Originally Posted by DVDK
What? there is a language called English, use it.
|
maybe you have better english skill man.
Forget English skills, just try help.
Now come with mimimimim.
No comments...
Re: RC5 and RC6 Bug with InRange -
Macluawn - 22.12.2010
He has npc that just walks / drives around the map. If a player with wanted level gets near the npc he gets +1 wanted level. in these new versions its not working.
The other problem is with armour giving - the player gets banned if a bodyguard gives him armour while player is in a car.
piohh, please post your npc and armour check code for us to help.
Re: RC5 and RC6 Bug with InRange -
piohh - 22.12.2010
Its a Bug with onplayerupdate.
onplayerupdate ignor this if a player is into a vehicle.
I add another timer and then all works fine.
Код:
if(WantedLevel[playerid]>=2 && PlayerCuffed[playerid]==0 && PlayerTied[playerid]==0 && PlayerInfo[playerid][pCrimInRangeWanted]==0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerNPC(i) && PlayerInfo[i][pMember]==1 && CrimInRange(30.0, playerid,i))
{
WantedPoints[playerid]+=2;
SetPlayerCriminal(playerid,255, "Suspect is near a NPC Cop in Los Santos");
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pCrimInRangeWanted] = 1;
SetTimerEx("CrimInRangeWanted", 284850, 0, "i", playerid);
return 1;
}
if(IsPlayerNPC(i) && PlayerInfo[i][pMember]==15 && CrimInRange(30.0, playerid,i))
{
WantedPoints[playerid]+=2;
SetPlayerCriminal(playerid,255, "Suspect is near a NPC Cop in San Fierro");
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pCrimInRangeWanted] = 1;
SetTimerEx("CrimInRangeWanted", 284850, 0, "i", playerid);
return 1;
}
if(IsPlayerNPC(i) && PlayerInfo[i][pMember]==23 && CrimInRange(30.0, playerid,i))
{
WantedPoints[playerid]+=2;
SetPlayerCriminal(playerid,255, "Suspect is near a NPC Cop in Las Venturas");
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pCrimInRangeWanted] = 1;
SetTimerEx("CrimInRangeWanted", 284850, 0, "i", playerid);
return 1;
}
}
}
}
First pic I'm sitting in the car and nothing...
I get out the car and... oO works...
Re: RC5 and RC6 Bug with InRange -
DVDK - 22.12.2010
Quote:
Originally Posted by piohh
and which part you don't understand?
|
This part:
Quote:
Originally Posted by piohh
The same if a player gives via Bodyguard a ppl into a car Armor
|
Ontopic:
Like Kye said before, it's not good to put mutch code into OnPlayerUpdate, this get's called about 20 times a second for each player.
EDIT: It's even whorse, you use a loop of MAX_PLAYERS (500) in OnPlayerUpdate + a lot of code? lolumad?
Re: RC5 and RC6 Bug with InRange -
MisterTickle - 22.12.2010
Yeah OUCH at that loop. Even with Foreach that would be yikes. Anyway, What is CrimInRange?
Re: RC5 and RC6 Bug with InRange -
piohh - 22.12.2010
Quote:
Originally Posted by MisterTickle
Yeah OUCH at that loop. Even with Foreach that would be yikes. Anyway, What is CrimInRange?
|
It's the same likes ProxDetector
No I don't use so mutch codes in onplayerupdate.
Re: RC5 and RC6 Bug with InRange -
MisterTickle - 22.12.2010
Can we see the code?