29.01.2012, 22:17
Hello everyone,
I am trying to make a trunk / boot system it's based that you can store certain items in the vehicle's rear boot/trunk (how americans or english people would say it).
However I have problems with this:
My problem is that when I do /vehtrunk putgun and only that, I get the message "SYNTAX: /vehtrunk putgun [1-4 slot]", however, if I do for example /vehtrunk putgun 3, nothing happens, and the message is not printed to the console.
p.s: I removed irrevelant bits of code.
Why?
I am trying to make a trunk / boot system it's based that you can store certain items in the vehicle's rear boot/trunk (how americans or english people would say it).
However I have problems with this:
pawn Code:
CMD:vehtrunk( playerid, params[] )
{
new option[64];
if( sscanf( params, "s[64]", option ) )
{
SendClientMessage( playerid, COLOR_GREEN, "SYNTAX: /vehtrunk [info/open/close/putgun/takegun/putcocaine/takecocaine/putheroin]");
SendClientMessage( playerid, COLOR_GREEN, "[takeheroin/putecstasy/takeecstasy/putcrack/takecrack/putweed/takeweed/putcrystalmeth]");
SendClientMessage( playerid, COLOR_GREEN, "[takecrystalmeth/putsteroids/takesteroids/putgascan/takegascan/putmaterials/takematerials]");
return 1;
}
if ( !isnull( option ) )
{
new closest = GetClosestVehicleInRange( playerid, 3.0 );
new szString[128];
else if ( !strcmp( option, "putgun", true ) )
{
new slot;
if( sscanf( params, "d", slot ) )
return SendClientMessage( playerid, COLOR_BEIGE, "SYNTAX: /vehtrunk putgun [1-4 slot]");
printf(" Slot: %d", slot );
}
}
return 1;
}
p.s: I removed irrevelant bits of code.
Why?