SA-MP Forums Archive
Cmd Help ! - 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: Cmd Help ! (/showthread.php?tid=395284)



Cmd Help ! - yaron0600 - 25.11.2012

Hey I made that command in my script :

Work , No error's compiled clean'd , But when I /vstorage on server nothing... That's doesnt even tell me that's not unknown cmd... What to do ? How to fix that please ?

Code:
CMD:vstorage(playerid, params[])
{
    new vstring[1024];
    for(new i; i < MAX_PLAYERVEHICLES; i++)
    {
        if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
            format(vstring, sizeof(vstring), "%s\n%s", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);

        else if(PlayerVehicleInfo[playerid][i][pvImpounded] == 1)
            format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);

        else
            format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
    }
    return 1;
}



Re: Cmd Help ! - Roel - 25.11.2012

Well you command isn't returning something, so it does work, but the string you made (vstring) doesn't show up somewhere, I think you should put it inside a dialog or message, if this is what you want.


Re: Cmd Help ! - Glad2BeHere - 25.11.2012

if ur using %s it cannot be used for the string u created (facepalm)

u have to put that in something like

SendClientMessage(pid,col,vstrong);


Re: Cmd Help ! - yaron0600 - 25.11.2012

SO HOW TO MAKE THE NEW code will work please ? !