14.01.2014, 00:44
A stock function is simply a regular function, like this:
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 Код:
MyFunction()
{
}
---
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;
}