Question about a stock and a command, +Rep!
#3

A stock function is simply a regular function, like this:

pawn Код:
MyFunction()
{
}
However, the "stock" keyword suppresses the "symbol is never used" warning when a function isn't used, as opposed to doing "#pragma unused".

---

Cut to the chase, you're using the "if" statement incorrectly, so maybe try this:

pawn Код:
CMD:spawnboat(playerid, params[])
{
    if (!IsPlayerInWater(playerid))
        return SendClientMessage(playerid, COLOR_RED, "You're not in water, therefore a boat will not be spawned!");
   
    if (IsPlayerInAnyVehicle(playerid)) {
        DestroyVehicle(GetPlayerVehicleID(playerid));
    }  
    ShowPlayerDialog(playerid, 19, DIALOG_STYLE_LIST, ""COL_BLUE"Boats:", ""COL_ORANGE"Test\n", "Select", "Cancel");
    return 1;
}
Reply


Messages In This Thread
Question about a stock and a command, +Rep! - by K9IsGodly - 14.01.2014, 00:10
Respuesta: Question about a stock and a command, +Rep! - by Swedky - 14.01.2014, 00:36
Re: Question about a stock and a command, +Rep! - by Emmet_ - 14.01.2014, 00:44
Re: Question about a stock and a command, +Rep! - by K9IsGodly - 14.01.2014, 00:50
Re: Question about a stock and a command, +Rep! - by newbie scripter - 14.01.2014, 02:08

Forum Jump:


Users browsing this thread: 1 Guest(s)