SA-MP Forums Archive
[HELP]convert this with YCMD... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]convert this with YCMD... (/showthread.php?tid=283031)



[HELP]convert this with YCMD... - TheBluec0de - 13.09.2011

SOLVED


Re: [HELP]convert this with YCMD... - TheBluec0de - 13.09.2011

I also use sscanf, but in this case? if you like?


Re: [HELP]convert this with YCMD... - Basicz - 13.09.2011

maybe im nub, i dunn understand sscanf much but try?
pawn Код:
YCMD:v( playerid, params[ ], help )
{
    if ( help )
        return SendClientMessage( playerid, -1, "HELP: Y U NO NEED Help. But you need Kelp Juice" );
       
    if ( IsPlayerInAnyVehicle( playerid ) )
        return SendClientMessage( playerid, -1, "Y U NO SEE U HAVE A VEH?" );

    new
        v = 65535,
        vs[ 128 ] = "MowCaddy",
        col1 = -1,
        col2 = -1
    ;
       
    sscanf( params, "s[128]ii", vs, col1, col2 );
    sscanf( params, "iii", v, col1, col2 );
   
    if ( strcmp( vs, "MowCaddy", false ) )
        v = GetVehicleModelFromName( vs );
       
    if ( !( 400 <= v <= 611 ) )
        return SendClientMessage( playerid, -1, "Y U NO KNOW VEHICLE IDS/NAME? OR Y U DONT ENTER ANY PARAM?" );
       
    new Float:o[ 4 ]; GetPlayerPos( playerid, o[ 0 ], o[ 1 ], o[ 2 ] );
    GetPlayerFacingAngle( playerid, o[ 3 ] );
   
    new veh = CreateVehicle( veh, o[ 0 ], o[ 1 ], o[ 2 ], o[ 3 ], col1, col2 );
   
    PutPlayerInVehicle( playerid, veh, 0 );
   
    return 1;
}



Re: [HELP]convert this with YCMD... - TheBluec0de - 13.09.2011

I have no idea how to convert ....


Re: [HELP]convert this with YCMD... - Kingunit - 13.09.2011

Try the code above and tell us if you are having any errors.


Re: [HELP]convert this with YCMD... - TheBluec0de - 13.09.2011

missing some things in the code above


Re: [HELP]convert this with YCMD... - Kingunit - 13.09.2011

Like? Explain more dude. Don't write those short posts so we need to ask for more information.


Re: [HELP]convert this with YCMD... - TheBluec0de - 13.09.2011

@ Kingunit I just posted the code of v with strcmp


Re: [HELP]convert this with YCMD... - Kingunit - 13.09.2011

Quote:
Originally Posted by TheBluec0de
Посмотреть сообщение
@ Kingunit I just posted the code of v with strcmp
"missing some things in the code above" explain what you are missing. It's not that hard. We are trying to help you, but you don't give enough information.


Re: [HELP]convert this with YCMD... - TheBluec0de - 13.09.2011

everything changes from what I've put on pastebin