22.03.2014, 08:21
Hello,
I came up here with a question. What would you prefer to use? See codes below:
So point of my question is to know what is the best way to use, #define or new? Please don't criticize if it's really a silly question.
I came up here with a question. What would you prefer to use? See codes below:
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
#define vehicle GetPlayerVehicleID(playerid)
if(vehicle == Player[playerid][pCar]) SendClientMessage(playerid, "It's your vehicle");
// codes to be used with vehicle
}
return 1;
}
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(playerid);
if(vehicle == Player[playerid][pCar]) SendClientMessage(playerid, "It's your vehicle");
// codes to be used with vehicle
}
return 1;
}