Tons of scripts out there already use that, it's not the issue...although redundant as it may be.
Printable View
the first problem is the main function. the way you have it spawndriver is not constant, it's only running once
Code:void main(void)
{
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
while(true)
{
SpawnDriver();
WAIT(0);
}
}
//put this one in
Can someone help me? I'm tryin to give other players infinite ammo(sort of)using Muskelprotze base.
Here's what i have so far, but it doesn't seem to work
Code:if(players[i].iammo){
uint pwep,ammo,clip;
GET_CURRENT_CHAR_WEAPON(tmp, &pwep);
GET_AMMO_IN_CHAR_WEAPON(tmp, pwep, &ammo);
GET_AMMO_IN_CLIP(tmp, pwep, &clip);
if(ammo < 1){
ADD_AMMO_TO_CHAR(tmp, pwep, AMMO_MAX);
}
}
Try getting the MAX ammo for the weapon and the clip instead. Then use whatever values those return to set their ammo and amount in clip respectively. To me, doing it at ammo < 1 means they have no ammo, at which point the player would throw the weapon away because it's empty. So maybe try a higher number there.
Alright well this probaly looks stupid and wont work but lol
if(players[i].iammo){
uint pwep,ammo,clip,maxammo,cmaxxammo;
GET_CURRENT_CHAR_WEAPON(tmp, &pwep);
GET_AMMO_IN_CHAR_WEAPON(tmp, pwep, &ammo);
GET_AMMO_IN_CLIP(tmp, pwep, &clip);
GET_MAX_AMMO(tmp, pwep, &maxammo);
GET_MAX_AMMO_IN_CLIP(tmp, pwep, &cmaxxammo);
if(ammo < 7){
ADD_AMMO_TO_CHAR(tmp, pwep, maxammo);
GIVE_WEAPON_TO_CHAR(tmp,pwep,maxammo,false);
}
if(clip < 7){
ADD_AMMO_TO_CHAR(tmp, pwep, cmaxxammo);
GIVE_WEAPON_TO_CHAR(tmp,pwep,cmaxxammo,false);
}
}
Yeah won't work. What weapon are you trying to give them lol? Try this:
Code:if(players[i].iammo){
uint pwep,ammo,maxammo,cmaxxammo;
GET_CURRENT_CHAR_WEAPON(tmp, &pwep);
GET_AMMO_IN_CHAR_WEAPON(tmp, pwep, &ammo);
GET_MAX_AMMO(tmp, pwep, &maxammo);
GET_MAX_AMMO_IN_CLIP(tmp, pwep, &cmaxxammo);
if((pwep == WEAPON_RLAUNCHER) && (ammo < 3)){
` SET_CHAR_AMMO(tmp, pwep, maxammo);
SET_AMMO_IN_CLIP(tmp, pwep, cmaxxammo);
}
else if(ammo < 10){
SET_CHAR_AMMO(tmp, pwep, maxammo);
SET_AMMO_IN_CLIP(tmp, pwep, cmaxxammo);
}
}