1
GENERAL DISCUSSION / Re: Need Cmds
« on: February 13, 2012, 01:48:13 pm »Code: [Select]
else if ( strcmp( cmd, "getcar", true ) == 0 ){
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c getcar [VehicleID]" );
else if ( !IsVehicleExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: Unknown Vehicle" );
else
{
new Float:X, Float:Y, Float:Z, Float:Angle, szMsg[ 128 ];
GetPlayerPos( playerid, X, Y, Z ); GetPlayerFacingAngle( playerid, Angle );
SetVehiclePos( strval( tmp ), X +3, Y +3, Z, Angle );
format( szMsg, sizeof( szMsg ), "Spawning vehicle:[ %s ]", tmp );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
return 1;
}