17.10.2012, 15:03
PHP код:
CMD:fixcar(playerid, params[])
{
if(jobVariables[playerVariables[playerid][pJob]][jJobType] == 3 || playerVariables[playerid][pAdminDuty] >= 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new
vehString[72],
Float: soPos[3],
vehicleID = GetPlayerVehicleID(playerid);
if(playerVariables[playerid][pJobDelay] == 0)
{ // DELAY!1
if(GetPlayerSpeed(playerid, 0) == 0)//here is the error
{
GetVehiclePos(vehicleID, soPos[0], soPos[1], soPos[2]);
PlayerPlaySoundEx(1133, soPos[0], soPos[1], soPos[2]);
RepairVehicle(vehicleID);
format(vehString, sizeof(vehString), "You have repaired your %s.", VehicleNames[GetVehicleModel(vehicleID) - 400]);
SendClientMessage(playerid, COLOR_WHITE, vehString);
playerVariables[playerid][pJobDelay] = 60;
}
else SendClientMessage(playerid, COLOR_WHITE, "You must stop your vehicle first.");
}
else
{
format(vehString, sizeof(vehString), "You need to wait %d seconds until you can use a mechanic command again.",playerVariables[playerid][pJobDelay]);
SendClientMessage(playerid, COLOR_GREY, vehString);
}
}
}
return 1;
}
PHP код:
CMD:colourcar(playerid, params[]) {
if(jobVariables[playerVariables[playerid][pJob]][jJobType] == 3) {
new
colors[2],
Float: soPos[3],
vehicleID = GetPlayerVehicleID(playerid);
if(sscanf(params, "dd", colors[0], colors[1])) {
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/colourcar [colour 1] [colour 2]");
}
else if(vehicleID) {
if(playerVariables[playerid][pJobDelay] == 0){ // DELAY!1
if(GetPlayerSpeed(playerid, 0) == 0){//here
if(colors[0] >= 0 && colors[0] < 256 && colors[1] >= 0 && colors[1] < 256) {
GetVehiclePos(vehicleID, soPos[0], soPos[1], soPos[2]);
PlayerPlaySoundEx(1134, soPos[0], soPos[1], soPos[2]);
ChangeVehicleColor(vehicleID, colors[0], colors[1]);
foreach(Player, v) {
if(playerVariables[v][pCarID] == vehicleID) {
playerVariables[v][pCarColour][0] = colors[0];
playerVariables[v][pCarColour][1] = colors[1];
}
}
SendClientMessage(playerid, COLOR_WHITE, "You have resprayed your vehicle.");
playerVariables[playerid][pJobDelay] = 60;
}
else SendClientMessage(playerid, COLOR_WHITE, "Valid vehicle colours are 0 to 255.");
}
else SendClientMessage(playerid, COLOR_WHITE, "You must stop your vehicle first.");
}
else SendClientMessage(playerid, COLOR_WHITE, "Please wait your job reload time.");
}
}
return 1;
}
Error is:
Please help me out (if you will ask I will give you rep) But please help me out with this, something isn't just working properly.. Quote:
warning 213: tag mismatch |
Quote:
warning 213: tag mismatch |
Regrads Scrillex!