#1

why only for id 0?

Код:
forward color3(playerid);
public color3(playerid)
{
    new vehicle;
	vehicle = GetPlayerVehicleID(playerid);
	if(vehicle > 0)
	{
		new r = random(sizeof(CarColors));
		new r1 = random(sizeof(CarColors));
		ChangeVehicleColor(vehicle, CarColors[r], CarColors[r1]);

	}
}
Reply
#2

Код:
forward color3(playerid);
public color3(playerid)
{
    new vehicle;
	vehicle = GetPlayerVehicleID(playerid);
	if(vehicle >= 0)
	{
		new r = random(sizeof(CarColors));
		new r1 = random(sizeof(CarColors));
		ChangeVehicleColor(vehicle, CarColors[r], CarColors[r1]);

	}
}
Reply
#3

WHAT?
Reply
#4

Quote:
Originally Posted by TenTen
Посмотреть сообщение
WHAT?
lol?
Reply
#5

1Deagle1 mean try this :

Код:
forward color3(playerid);
public color3(playerid)
{
    new vehicle;
	vehicle = GetPlayerVehicleID(playerid);
	if(vehicle >= 0)
	{
		new r = random(sizeof(CarColors));
		new r1 = random(sizeof(CarColors));
		ChangeVehicleColor(vehicle, CarColors[r], CarColors[r1]);

	}
}
instead of yours
Reply
#6

Код:
if(vehicle >= 0)
oh lol i'll try it Thanks
Reply
#7

https://www.youtube.com/watch?v=mxHKBsbnpJw
Reply
#8

Quote:
Originally Posted by TenTen
Посмотреть сообщение
why only for id 0?

Код:
forward color3(playerid);
public color3(playerid)
{
    new vehicle;
	vehicle = GetPlayerVehicleID(playerid);
	if(vehicle > 0)
	{
		new r = random(sizeof(CarColors));
		new r1 = random(sizeof(CarColors));
		ChangeVehicleColor(vehicle, CarColors[r], CarColors[r1]);

	}
}
NOTE:
* All players ID of 0 to 999
* All vehicles ID of 1 to 2000

Server log:
Код:
// Add player classes
[20:44:42] index 0 playerid 0 skin 0 // Player1
[20:44:42] index 1 playerid 1 skin 0 // Player2
[20:44:42] index 2 playerid 2 skin 0 // Player3
// Add static vehicles
[20:44:42] index 0 vehicleid 0 model 0 // Empty
[20:44:42] index 1 vehicleid 1 model 596 // Car1
[20:44:42] index 2 vehicleid 2 model 596 // Car2
[20:44:42] index 3 vehicleid 3 model 596 // Car3
PHP код:
forward color3(playerid);
public 
color3(playerid)
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    if (
vehicleid// If ID 1 Car defined If 0 no exist
    
{
        
ChangeVehicleColor(vehicleidrandom(sizeof(CarColors), random(sizeof(CarColors));
        return 
true;
    }
    return 
false;

Reply
#9

Show us where you use SetTimerEx. (Your /rb command)
Reply
#10

Quote:
Originally Posted by Logofero
Посмотреть сообщение
NOTE:
* All players ID of 0 to 999
* All vehicles ID of 1 to 2000

Server log:
Код:
// Add player classes
[20:44:42] index 0 playerid 0 skin 0 // Player1
[20:44:42] index 1 playerid 1 skin 0 // Player2
[20:44:42] index 2 playerid 2 skin 0 // Player3
// Add static vehicles
[20:44:42] index 0 vehicleid 0 model 0 // Empty
[20:44:42] index 1 vehicleid 1 model 596 // Car1
[20:44:42] index 2 vehicleid 2 model 596 // Car2
[20:44:42] index 3 vehicleid 3 model 596 // Car3
PHP код:
forward color3(playerid);
public 
color3(playerid)
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    if (
vehicleid// If ID 1 Car defined If 0 no exist
    
{
        
ChangeVehicleColor(vehicleidrandom(sizeof(CarColors), random(sizeof(CarColors));
        return 
true;
    }
    return 
false;

Sorry, can i ask you? All players ID of 0 to 999. what is the max slot in samp?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)