public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/tune", true)) { new playerstate = GetPlayerState(playerid); if(playerstate == PLAYER_STATE_DRIVER) if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61)) { ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close"); return 1; } else { return SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage."); } } return 0; }
CMD:tune(playerid, params[ ])
{
new playerstate = GetPlayerState(playerid);
if(playerstate == PLAYER_STATE_DRIVER)
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61))
{
ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close");
return 1;
}
else
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage."); }
}
return 1;
}
COMMAND:tune(playerid, params[]) { new playerstate = GetPlayerState(playerid); if(playerstate == PLAYER_STATE_DRIVER) if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61)) { ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close"); return 1; } else return SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage."); } } return 1; }
public OnPlayerCommandText(playerid, cmdtext[]) { =============here ======= |
CMD:tune(playerid, params[])
{
new playerstate = GetPlayerState(playerid);
if(playerstate == PLAYER_STATE_DRIVER)
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61))
{
ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close");
return 1;
}
else
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage."); }
}
return 1;
}
OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success == 0)
return SendClientMessage(playerid,0xFF000AA,"Put your Error Message over here if invalid command."); // Optional.
return 1;
}
CMD:tune(playerid, params[])
{
new playerstate = GetPlayerState(playerid);
if(playerstate == PLAYER_STATE_DRIVER)
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61))
{
ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close");
return 1;
}
else
{
return SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage."); }
}
return 1;
}
warning 209: function "cmd_tune" should return a value error 010: invalid function or declaration |
CMD:tune(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61))
{
ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close");
}
else
{
SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage.");
}
}
return 1;
}
CMD:tune(playerid, params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "SERVER: You must be in a vehicle to tune it.");
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1256.05, -1469.17, 13.61))
ShowPlayerDialog(playerid, DIALOG_TYPE_MAIN, DIALOG_STYLE_LIST, "Tuning Garage", "Paint Jobs\nColors\nHoods\nVents\nLights\nExhausts\nFront Bumpers\nRear Bumpers\nRoofs\nSpoilers\nSide Skirts\nBullbars\nWheels\nCar Stereo\nHydraulics\nNitrous Oxide\nRepair Car", "Enter", "Close");
else
SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a Tuning garage.");
return 1;
}