06.03.2011, 10:53
The PutPlayerInVehicle function have to have 3 parameters, and you put only 2 
I think that car1 and car2 are global variables, so, let's go.
Look, i fixed it for you:
I hope that i have helped

I think that car1 and car2 are global variables, so, let's go.
Look, i fixed it for you:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/ready",cmdtext,true,6)==0)
{
if(IsVehicleOccupied(car1))
{
PutPlayerInVehicle(playerid, car2, 0);//There was only 2 parameters
}
else
{
PutPlayerInVehicle(playerid, car1, 0);//There was only 2 parameters
TogglePlayerControllable(playerid, 0);//This line freezes the player that used the command
return 1;
}
return 1;
}
return 0;
}
