CMD:deleteveh(playerid, params[])
{
if ( GetPVarInt( playerid, "Level" ) < 4 )
return SendClientMessage( playerid, -1, "You must be the "COL_LIGHTBLUE""Level4"{FFFFFF} to delete a vehicle.");
{
new vehicleid, string[64];
if(!sscanf(params, "i", vehicleid))
{
DestroyVehicle(vehicleid);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vehicle ID:{FFFFFF} %d has been succesfully deleted.", vehicleid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
if ( sscanf( params, "uS", params[ 0 ]) )
return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /deleteveh <Vehicle ID>");
}
return 1;
}
CMD:createveh(playerid, params[])
{
if ( GetPVarInt( playerid, "Level" ) < 4 )
return SendClientMessage( playerid, -1, "You must be the "COL_LIGHTBLUE""Level4"{FFFFFF} to create a vehicle.");
{
new modelid, col1, col2, float:X, float:Y, float:Z, float:angle, string[64];
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, angle);
if(!sscanf(params, "i", modelid, col1, col2))
{
CreateVehicle(modelid, X, Y, Z, angle, col1, col2, 0);
format(string, sizeof(string), """COL_LIGHTBLUE"Vehicle Model ID:{FFFFFF} %d has been succesfully Spawned.", modelid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
if ( sscanf( params, "uS", params[ 0 ]) )
return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /createveh <Vehicle ID> <Color 1> <Color 2>");
}
return 1;
}
If this helped you, I will accept +REP // :)
..\location\gamemodes\sc-rp.pwn(164) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(164) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(164) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(165) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(168) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(168) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(168) : warning 213: tag mismatch ..\location\gamemodes\filename.pwn(168) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Warnings.

|
pawn Код:
|
|
Originally Posted by FlapnaadPro
pawn Код:
|
CMD:createveh(playerid, params[])
{
new float:X, float:Y, float:Z;
GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
new modelid, col1, col2, string[64];
new float:angle;
GetPlayerFacingAngle(playerid, Float:angle);
if ( GetPVarInt( playerid, "Level" ) < 4 )
return SendClientMessage( playerid, -1, "You must be the "COL_LIGHTBLUE""Level4"{FFFFFF} to create a vehicle.");
{
if(sscanf(params, "d", modelid, col1, col2))
{
CreateVehicle(modelid, Float:X, Float:Y, Float:Z, Float:angle, col1, col2, 0);
format(string, sizeof(string), ""COL_LIGHTBLUE"Vehicle Model ID:{FFFFFF} %d has been succesfully Spawned.", modelid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
if ( sscanf( params, "uS", params[ 0 ]) )
return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /createveh <Vehicle ID> <Color 1> <Color 2>");
}