Re: SA-MP 0.3.7 RC2 -
AroseKhanNiazi - 06.03.2015
from now old loops won't work ?
Re: SA-MP 0.3.7 RC2 -
JaydenJason - 06.03.2015
Quote:
Originally Posted by AroseKhanNaizi
from now old loops won't work ?
|
you can redefine them for MAX_PLAYERS to be GetPlayerPoolSize()
for example new loops should be like this
Код:
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
Re: SA-MP 0.3.7 RC2 -
AroseKhanNiazi - 06.03.2015
Quote:
Originally Posted by JaydenJason
you can redefine them for MAX_PLAYERS to be GetPlayerPoolSize()
for example new loops should be like this
Код:
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
|
so only players loop are changed ?
Re: SA-MP 0.3.7 RC2 -
TommyB - 06.03.2015
Quote:
Originally Posted by AroseKhanNaizi
so only players loop are changed ?
|
Nope, it applies to vehicles as well. Instead of using MAX_VEHICLES you can use GetVehiclePoolSize().
Re: SA-MP 0.3.7 RC2 -
AroseKhanNiazi - 06.03.2015
Quote:
Originally Posted by TommyB
Nope, it applies to vehicles as well. Instead of using MAX_VEHICLES you can use GetVehiclePoolSize().
|
Thanks both of you.
Re: SA-MP 0.3.7 RC2 -
Crayder - 06.03.2015
Quote:
Originally Posted by JaydenJason
you can redefine them for MAX_PLAYERS to be GetPlayerPoolSize()
for example new loops should be like this
Код:
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
|
NO! DON'T REDEFINE MAX_PLAYERS! ALL OF YOUR PER PLAYER VAR'S WILL BE DESTROYED!
Re: SA-MP 0.3.7 RC2 -
AroseKhanNiazi - 06.03.2015
Quote:
Originally Posted by Crayder
NO! DON'T REDEFINE MAX_PLAYERS! ALL OF YOUR PER PLAYER VAR'S WILL BE DESTROYED!
|
Ah i even didin't do that btw thanks, i am gonna use GetPlayerPoolSize Anyway. But thanks for the alert this might save a lot of player.
Re: SA-MP 0.3.7 RC2 -
QuaTTrO - 08.03.2015
/audiomsg should be disabled by default imo. Not removed.
Re: SA-MP 0.3.7 RC2 -
Chaster - 08.03.2015
Good updates...
Re: SA-MP 0.3.7 RC2 -
T-N-Z - 08.03.2015
UsePlayerPedAnims has no parameters same with DisableInteriorEnterExits. Having playerid on those two would be usefull.
Re: SA-MP 0.3.7 RC2 -
SchurmanCQC - 09.03.2015
Could someone explain what exactly '/ctd' does? I've tried it but nothing happened.
Re: SA-MP 0.3.7 RC2 -
DRUNKY - 09.03.2015
waiting for the next release!
Re: SA-MP 0.3.7 RC2 -
Micro32 - 09.03.2015
When will be launched ?
Re: SA-MP 0.3.7 RC2 -
Jake187 - 09.03.2015
Quote:
Originally Posted by Micro32
When will be launched ?
|
When it's ready and be patience the longer you wait the better it will overall be.
Re: SA-MP 0.3.7 RC2 -
Crayder - 09.03.2015
Test Results:
This Works -
InternalToStreamerID(playerid, GetPlayerCameraTargetObject(playerid));
This Doesn't -
InternalToStreamerID(playerid, GetPlayerSurfingObjectID(playerid));
Re: SA-MP 0.3.7 RC2 -
IstuntmanI - 09.03.2015
Quote:
Originally Posted by Crayder
Test Results:
This Works -
InternalToStreamerID(playerid, GetPlayerCameraTargetObject(playerid));
This Doesn't -
InternalToStreamerID(playerid, GetPlayerSurfingObjectID(playerid));
|
GetPlayerCameraTargetObject should return 0 too for a player object. I don't know what mistake you did that it returned something.
Let's simplify this test: we are basically arguing about global objects functions (those two) working on player objects.
Just test another one: CreatePlayerObject (with moving too, for the second function), GetPlayerCameraTargetObject and GetPlayerSurfingObjectID, both on that created player object ID.
Both should return 0 because they work only on global objects (CreateObject) (as I claim), not on player objects too (as you claim to). You claim that they work, so they should return the ID of the player object instead of 0. I want you to see why we need a player object version for those functions.
I would test too, but I already know the behaviour of these functions and, also, my laptop is in repairing process.
Re: SA-MP 0.3.7 RC2 -
Crayder - 09.03.2015
Quote:
Originally Posted by IstuntmanI
GetPlayerCameraTargetObject should return 0 too for a player object. I don't know what mistake you did that it returned something.
Let's simplify this test: we are basically arguing about global objects functions (those two) working on player objects.
Just test another one: CreatePlayerObject (with moving too, for the second function), GetPlayerCameraTargetObject and GetPlayerSurfingObjectID, both on that created player object ID.
Both should return 0 because they work only on global objects (CreateObject) (as I claim), not on player objects too (as you claim to). You claim that they work, so they should return the ID of the player object instead of 0. I want you to see why we need a player object version for those functions.
I would test too, but I already know the behaviour of these functions and, also, my laptop is in repairing process.
|
Here is the results for CameraTargetObject:
(1st 2 #s are from global functions, 2nd 2 #s are using my define. Notice that mine are the correct models and the global return the wrongs object id's model.)

EDIT: forgot to mention that every single object there is dynamic.
Re: SA-MP 0.3.7 RC2 -
IstuntmanI - 09.03.2015
Quote:
Originally Posted by Crayder
Here is the results for CameraTargetObject:
(1st 2 #s are from global functions, 2nd 2 #s are using my define. Notice that mine are the correct models and the global return the wrongs object id's model.)
 EDIT: forgot to mention that every single object there is dynamic.
|
Keep it without using the streamer. We just want to test global and player objects. It's still weird that you receive different results for global and streamer. You're messing up something. Keep it simple.
EDIT: I remember that in earlier versions the pill effect made the player run very fast, but in newer versions it had no effect, I am not sure.
Re: SA-MP 0.3.7 RC2 -
Crayder - 09.03.2015
Quote:
Originally Posted by IstuntmanI
Keep it without using the streamer. We just want to test global and player objects. It's still weird that you receive different results for global and streamer. You're messing up something. Keep it simple.
|
Nothing is messed up. The dynamic results are correct because the id is converted from what the player was reporting to what streamer is holding in it's memory (the unique id created by streamer and all of it's data). The global functions are taking the ID directly from the players objects so it's results are false. That's as simple as it gets.
Re: SA-MP 0.3.7 RC2 -
KubiPL - 10.03.2015
Globally created objects are same as per-player but for everybody. You can do stuff on global objects with player objects functions, but results will only be shown for that player. Same with streamer, it create per player objects.