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.
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;
}
AddARepairPickups
ARepairPickups(Float:x, Float:y, Float:z)
AddARepairPickups(x, y, z);
stock ARepairPickups(Float:x, Float:y, Float:z) stock IsPlayerAtRepair(playerid)
(4507) : error 017: undefined symbol "AddARepairPickups"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
CMD:createrepair(playerid,params[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
AddARepairPickups(x, y, z);
return 1;
}
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; } } }
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; } } }
AddARepairPickups(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; } } }
ARepairPickups
Create3DTextLabel(TXT_PickupRepair, 0xFFFFFFFF, x, y, z + 0.8, 30.0, 0);
ARepairPickups[i][TextLabel] = Create3DTextLabel(TXT_PickupRepair, 0xFFFFFFFF, x, y, z + 0.8, 30.0, 0);
Код:
ARepairPickups enum aInfo { PickupID, Float: pux, Float: puy, Float: puz, Text3D: TextLabel }; new ARepairPickups[MAX_REPAIR_PICKUPS][aInfo]; You don't have to use the last variable (TextLabel), but if you do, then exchange this: Код:
Create3DTextLabel(TXT_PickupRepair, 0xFFFFFFFF, x, y, z + 0.8, 30.0, 0); Код:
ARepairPickups[i][TextLabel] = Create3DTextLabel(TXT_PickupRepair, 0xFFFFFFFF, x, y, z + 0.8, 30.0, 0); Problem solved? |
CMD:createrepair(playerid,params[]) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); AddARepairPickups(x, y, z); return 1; }
CMD:createrepair(playerid,cmdtext[]) { #pragma unused cmdtext new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); AddARepairPickups(x, y, z); return 1; }
So it creates a pickup but somewhere else?
Change: Код:
CMD:createrepair(playerid,params[]) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); AddARepairPickups(x, y, z); return 1; } Код:
CMD:createrepair(playerid,cmdtext[]) { #pragma unused cmdtext new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); AddARepairPickups(x, y, z); return 1; } |