"Weapon Rush"
#1

I have a DM server.. I am trying to have a random spawn for a minigun. I have spawn points for various weapons on the map but I want to have the miniun as a "privelige".

This is what I want: So far I have 3 spawn points for the minigun (as a test). The minigun appears when the server starts up. When the player collects the minigun, it must not spawn in the same place again but spawn randomly at one of the other spawn points I have indicated.. The same thing must happen when the player picks it up at the new spawn point.. (And so on...)

This is what I have so far, please correct me where I am going wrong:

Under OnGameModeInt()
Код:
CreatePickup(362, 2, -309.0875,850.5108,11.0620);//minigun test
And this....

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	new pickup;
	DestroyPickup(pickup);
	switch(random(3))
	{
	  	case 0:{
      AddStaticPickup(362, 2, -309.0875,850.5108,11.0620);
    }
   	case 1:{
      	AddStaticPickup(362, 2, -302.3301,813.5313,14.6658);
    }
    case 2:{
      	AddStaticPickup(362, 2, -264.7070,798.2562,16.5643);
    }
	}
	return 1;
}
Please correct me where I am wrong
Reply
#2

You can't use AddStaticPickup at OnPlayerPickUpPickup-callback, use CreatePickup instead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)