20.01.2014, 22:19
I got errors from code.
pawn Код:
error 017: undefined symbol "AddARepairPickups"
warning 203: symbol is never used: "ARepairPickups"
warning 203: symbol is never used: "IsPlayerAtRepair"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
ARepairPickups(Float:x, Float:y, Float:z)
{
for (new i; i < sizeof(ARepairPickups); i++)
{
if (ARepairPickups[i][PickupID] == 0)
{
ARepairPickups[i][PickupID] = CreatePickup(27, 1, x, y, z, 0);
ARepairPickups[i][pux] = x;
ARepairPickups[i][puy] = y;
ARepairPickups[i][puz] = z;
Create3DTextLabel(TXT_PickupRepair, 0xFFFFFFFF, x, y, z + 0.8, 30.0, 0);
CreateDynamicMapIcon(x, y, z, 56, 0, 0, 0, -1, 300.0);
break;
}
}
}
bool:IsPlayerAtRepair(playerid)
{
for(new i; i != sizeof(ARepairPickups); i++)
if(IsPlayerInRangeOfPoint(playerid, 2.5, ARepairPickups[i][pux], ARepairPickups[i][puy], ARepairPickups[i][puz]))
return true;
return false;
}
CMD:createrepair(playerid,params[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
AddARepairPickups(x, y, z);
return 1;
}
CMD:repairtest(playerid, params[])
{
if(GetPlayerVehicleSeat(playerid) != 0) SendClientMessage(playerid, 0xFF0000AA, "You are not a driver!");
else if(!IsPlayerAtGasStation(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You not at the repair place!");
else{
SetTimerEx("Repair", 5000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, TXT_PickupRepair, 3000, 4);
}
return 1;
}