18.02.2012, 00:21
For the people above me.. You don't need to use sscanf if you're just using 1 parameter.
Here is a simple version for you to play around with:
Here is a simple version for you to play around with:
pawn Code:
CMD:deleteveh(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, KLEUR_WIT, "You are not an Administrator.");
else if(isnull(params)) return SendClientMessage(playerid, KLEUR_WIT, "{B4B5B7}USAGE: /deleteveh [vehicleid]");
else
{
new vehicleid = strval(params);
if(vehicleid == INVALID_VEHICLE_ID) return SendClientMessage(playerid,-1,"Not a vaild vehicle");
DestroyVehicle(vehicleid);
new string[128];
format(string, sizeof(string), "You succesfully deleted vehicle ID: %i", vehicleid);
SendClientMessage(playerid,-1,string);
}
return 1;
}