13.01.2010, 03:24
So yeah, I have this code that re-sets the weapon if a player has one.
I have this code also, making a pickup which I want to re-set the weapon and ammo they had..
- Note : When I run threw the icon, nothing happens..
Quote:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1545.8363,-1678.9054,13.8754)) // Court Doors { if(GetPlayerWeapon(playerid) == 24) { SendClientMessage(playerid,0xFFFFFFFF,"Works"); for(new s; s < 13; s++) { for(new w; w < 46; w++) { if (PlayerWeaponInfo[playerid][w] > 0) { PlayerWeapon[playerid] = w; GivePlayerGun(playerid, w, 1); PlayerWeaponInfo[playerid][w] = GetPlayerAmmo(playerid)-1; courtgun = AddStaticPickup(348, 1, 1535.7446,-1682.0582,13.5469, 0); } } } ResetPlayerWeapons(playerid); for(new w; w < 13; w++) { PlayerWeapon[playerid][w] = 0; } } |
I have this code also, making a pickup which I want to re-set the weapon and ammo they had..
Quote:
if (pickupid == courtgun) // { new tmp[256]; new weaponid = GetWeaponID(tmp); for(new s; s < 13; s++) { for(new w; w < 13; w++) { GivePlayerGun(playerid, weaponid, PlayerWeaponInfo[playerid][weaponid]); PlayerWeapon[playerid][w] = weaponid; SendClientMessage(playerid, COLOR_WHITE, "WORKS"); } return 1; } } |