21.05.2018, 23:58
(
Последний раз редактировалось bookknp; 22.05.2018 в 01:57.
)
hello friends, i need defined "GiveDodWeapon", I have copied this code and dont know the way fix it.
PHP код:
CMD:pickupweapon(playerid, params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;
new slot = -1;
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_OBJ; i++)
if(dGunData[i][ObjData][0] > 0 && IsValidObject(dGunData[i][ObjData][0]))
{
GetObjectPos(dGunData[i][ObjData][0], x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
{
slot = i;
break;
}
}
if(slot < 0) return SendClientMessage(playerid, 0x33AA3300, "You are not near the weapon which you can pick up!");
DestroyObject(dGunData[slot][ObjData][0]);
GiveDodWeapon (playerid, dGunData[slot][ObjData][1], dGunData[slot][ObjData][2]); // <---- error line
dGunData[slot][ObjData][0] = 0;
new buffer[50];
format(buffer, sizeof(buffer), "You picked up %s", GunNames[dGunData[slot][ObjData][1]]);
SendClientMessage(playerid, 0x33AA3300, buffer);
return 1;
}
PHP код:
C:\Users\1320703\Desktop\GTA3\server2\gamemodes\Kon4.pwn(21523) : error 017: undefined symbol "GiveDodWeapon"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.