27.07.2015, 21:50
Hi there!
I can't understand when i have to use return 1 or return 0 in a function.
For example, which is good?
or
When and why?
I can't understand when i have to use return 1 or return 0 in a function.
For example, which is good?
Code:
if(listitem == 0) { if(PlayerData[playerid][pLocateCar] == 1) { format(szMessage, sizeof(szMessage), "Your car (Model: %s) has been respawned!", VehicleNames[PlayerData[playerid][pCarModel1] - 400]); SendClientMessage(playerid, COLOR_WHITE, szMessage); } }
Code:
if(listitem == 0) { if(PlayerData[playerid][pLocateCar] == 1) { format(szMessage, sizeof(szMessage), "Your car (Model: %s) has been respawned!", VehicleNames[PlayerData[playerid][pCarModel1] - 400]); SendClientMessage(playerid, COLOR_WHITE, szMessage); } return 1; }