29.09.2013, 16:36
as the tittle say , i got some problem after mixing Dropgun FS by PeteShag
after i do /dropgun , its working nicely
but after i drop it , and i do /pickupgun the gun is not on my hand and just say "Ivander has bla bla"
what i miss on that code ?
after i do /dropgun , its working nicely
but after i drop it , and i do /pickupgun the gun is not on my hand and just say "Ivander has bla bla"
Код:
CMD:pickupgun(playerid, params[]) { new sendername[MAX_PLAYER_NAME]; new string[128]; if(PlayerInfo[playerid][pConnectTime] < 2 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You're currently restricted from possessing weapons!"); for(new i = 0; i < sizeof(DropInfo); i++) { if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ])) { if(GetPlayerVirtualWorld(playerid) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(playerid) == DropInfo[i][DropGunVWorld]) { GetPlayerName(playerid, sendername, sizeof(sendername)); DestroyDynamicObject(DropObject[i]); DropInfo[i][DropGunPosX] = 0.0; DropInfo[i][DropGunPosY] = 0.0; DropInfo[i][DropGunPosZ] = 0.0; DropInfo[i][DropGunAmmount][0] = 0; DropInfo[i][DropGunAmmount][1] = 0; GivePlayerValidWeapon(playerid,DropInfo[i][DropGunAmmount][0],60000); format(string, sizeof(string), "* %s picks up a weapon from the ground.", sendername); SendLocalMessage(playerid, string, 10.0, COLOR_PURPLE, COLOR_PURPLE); return 1; } } } return 1; }