Streamer 2.9.3 problems - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Streamer 2.9.3 problems (
/showthread.php?tid=652513)
Streamer 2.9.3 problems -
Fairuz - 13.04.2018
PHP код:
ReinitBusPassenger(id)
{
new skin, l, Float:x, Float:y, Float:z, Float:a;
print("called 1");
for(new i; i < MAX_GLOBAL_PASSENGERS; i++)
{
switch(id)
{
case 1:
{
if(!IsValidActor(PassengerActor[i]))
{
skin = random(311) + 1;
do
{
l = random(sizeof(PassengerLocations));
}
while(GlobalLocationsCount[l] >= 6);
GlobalLocationsCount[l]++;
x = PassengerLocations[l][0];
y = PassengerLocations[l][1];
z = PassengerLocations[l][2];
a = PassengerLocations[l][3];
x -= (frandom(1.5) * floatsin(-a, degrees));
y -= (frandom(1.5) * floatcos(-a, degrees));
x += ((1.0 * float(GlobalLocationsCount[l])) * floatsin(absoluteangle(a + 90.0), degrees));
y += ((1.0 * float(GlobalLocationsCount[l])) * floatcos(absoluteangle(a + 90.0), degrees));
PassengerActor[i] = CreateActor(skin, x, y, z, a);
print("called case 1");
}
}
case 2:
{
if(!IsValidActor(PassengerActor2[i]))
{
skin = random(311) + 1;
do
{
l = random(sizeof(PassengerLocations2));
}
while(GlobalLocationsCount2[l] >= 7);
GlobalLocationsCount2[l]++;
x = PassengerLocations2[l][0];
y = PassengerLocations2[l][1];
z = PassengerLocations2[l][2];
a = PassengerLocations2[l][3];
x -= (frandom(1.5) * floatsin(-a, degrees));
y -= (frandom(1.5) * floatcos(-a, degrees));
x += ((1.0 * float(GlobalLocationsCount2[l])) * floatsin(a + 90.0, degrees));
y += ((1.0 * float(GlobalLocationsCount2[l])) * floatcos(a + 90.0, degrees));
PassengerActor2[i] = CreateActor(skin, x, y, z, a);
print("called case 2");
}
}
}
}
}
Actor is not created even though the print is working.
I don't understand though why Actor isn't created even though it's not related to CreateDynamicActor
Re: Streamer 2.9.3 problems -
Fairuz - 14.04.2018
anyone?
Re: Streamer 2.9.3 problems -
TitoRayne - 14.04.2018
Try to use this one..
https://sampforum.blast.hk/showthread.php?tid=613665
Re: Streamer 2.9.3 problems -
Fairuz - 14.04.2018
I found out that CreateActor is working fine outside this code,what's wrong?