pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/repairkit", cmdtext, true) == 0)
{
new Float:X, Float:Y, Float:Z;
if (DoesPlayerHaveRepairKit[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
//86 SetVehicleHealth(vehicleid, 1000.0);
PlayerPlaySound(playerid, 1133, X, Y, Z);
DoesPlayerHaveRepairKit[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, " You do not have a Repair kit, and/or aren't in a Vehicle !");
PlayerPlaySound(playerid, 1084, X, Y, Z);
}
return 1;
}
if (strcmp("/checkrepairkit", cmdtext, true) == 0)
{
new Float:X, Float:Y, Float:Z;
if(DoesPlayerHaveRepairKit[playerid] == 1)
{
SendClientMessage(playerid, COLOR_BLUE, " You have a Repair kit, /repairkit to use it.");
PlayerPlaySound(playerid, 1083, X, Y, Z);
}
else
{
SendClientMessage(playerid, COLOR_RED, " You do not have a Repair kit, buy one from the Docks.");
PlayerPlaySound(playerid, 1084, X, Y, Z);
}
return 1;
}
if (strcmp("/buyrepairkit", cmdtext, true) == 0)
{
new Float:X, Float:Y, Float:Z;
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(2.00, playerid, 2415.6770,-2229.1726,13.5469))
{
if(GetPlayerMoney(playerid) >= 250)
{
DoesPlayerHaveRepairKit[playerid] = 1;
GivePlayerMoney(playerid, -250);
PlayerPlaySound(playerid, 1083, X, Y, Z);
SendClientMessage(playerid, COLOR_BLUE, " Bought a Repair Kit, use /repairkit to Repair your Vehicle");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, " You don't have enough money, or aren't at the Docks !");
PlayerPlaySound(playerid, 1084, X, Y, Z);
}
}
}
return 1;
}
//140 return 0;
}
I know why this is happening. I just need to know how to fix it & make it work. I can usually just place /**/ over the return 0; (that works although I'm pretty sure you're meant to return 0
and it appears you have an extra bracket on line 137 or what have you, i may be wrong, but im pretty sure
that was a fast reply. I wanted to help but woke up too late ;/ ;d