All pastes #537027 Raw Edit

Something

public text v1 · immutable
·published 2007-06-04 16:25 UTC
rendered paste body
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/destroy", cmdtext, true, 10) == 0)
	{
		// Do something here
		if ( carid > 0 )
		{
		    for ( new i; i < MAX_PLAYERS; i++ )
		    {
		        if ( IsPlayerConnected( i ) )
		        {
			        if ( IsPlayerInVehicle( i , carid ) )
			        {
						RemovePlayerFromVehicle( i );
					}
				}
			}
			
			SetVehicleToRespawn( carid );
			SetVehicleVirtualWorld( carid , 99 );
			SetVehiclePos( caird ,
			DestroyVehicle( carid );
			carid = -1;
		}
		return 1;
	}
	if (strcmp("/create", cmdtext, true, 10) == 0)
	{
		// Do something here
		if ( carid == -1 )
		{
			carid = CreateVehicle( 483 ,2165.5981,1107.8210,11.5619,332.4129,-1,-1 , 100 );
		}
		return 1;
	}
	return 0;
}