new eventcars[][8] =
{
{517, 494, 504, 525},
{588, 524, 495, 543} //
};
CMD:join(playerid, params[]) // this code is down below the entire script.
{
else // some code lines on top of else.
{
if(derbydm[playerid] == true)
{
new randcar = random(sizeof(eventcars));
SendClientMessage(playerid, -1, "You have joined the derby DM!");
playingderbydm[playerid]++;
PutPlayerInVehicle(playerid, eventcars[randcar][0], 0);
}
}
return 1;
}
stock IsVehicleOccupied(vehicleid)
{
for(new i =0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i,vehicleid))
{
return 1;
}
}
return 0;
}
CMD:join(playerid, params[]) // this code is down below the entire script.
{
else // some code lines on top of else.
{
if(derbydm[playerid] == true)
{
new randcar = random(sizeof(eventcars));
SendClientMessage(playerid, -1, "You have joined the derby DM!");
playingderbydm[playerid]++;
if(!IsVehicleOccupied(vehicleid))
{
PutPlayerInVehicle(playerid, eventcars[randcar][0], 0);
}
}
}
return 1;
}
new eventcars[][8] =
{
{517, 494, 504, 525},
{588, 524, 495, 543} //
};
new eventcars[][] =
{
{517, 494, 504, 525},
{588, 524, 495, 543} //
};
CMD:join(playerid, params[]) // this code is down below the entire script.
{
else // some code lines on top of else.
{
if(derbydm[playerid] == true)
{
new randcar = random(sizeof(eventcars));
SendClientMessage(playerid, -1, "You have joined the derby DM!");
playingderbydm[playerid]++;
new car = CreateVehicle(520, eventcars[randcar][0], eventcars[randcar][1], eventcars[randcar][3], eventcars[randcar][4], 0, 1, 60);
PutPlayerInVehicle(playerid, car, 0);
}
}
return 1;
}
this:
pawn Код:
pawn Код:
pawn Код:
|
CMD:join(playerid, params[])
{
// ...
else
{
if(derbydm[playerid] == true)
{
new randcar = random(sizeof(eventcars));
SendClientMessage(playerid, -1, "You have joined the derby DM!");
playingderbydm[playerid]++;
new vehicleid = GetPlayerVehicleID(playerid);
if(!IsVehicleOccupied(vehicleid))
{
PutPlayerInVehicle(playerid, eventcars[randcar][0], 0);
}
}
}
return 1;
}