Private pickups?
#1

Hi guys.
I'm really disappointed. I want to create a pickup for MicroSMG near Grove Street. You pick it up and you won't see it again until your next death. I want the MicroSMG to respawn only for the player who died, not for all.
Example(I want the following effects):
A guy n me. We go to the Grove place. I pick up the pickup. The guy does so, too. I die. But not the guy. The pickup should not respawn for him when I spawn. So the pickup is visible for me, not for the guy. He's dead. Now he can see it again.
Reply
#2

https://sampwiki.blast.hk/wiki/Pickup_help
Reply
#3

Huh? Please explain yourself. I don't understand why you arew sending me such a URL.
Reply
#4

pawn Код:
new pickuppickedup[MAX_PLAYERS];
new pickup;

pickup = CreatePickup(bla...bla...bla...);

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == pickup)
  {
    if(pickuppickedup[playerid] == 1)
    {
      SendClientMessage(bla bla bla) // SendClientMessage, that pickup already picked up...        
    }else{
      //Do something here, when pickup is not picked up.
      pickuppickedup[playerid] = 1;
    }
  }
  return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
  pickuppickedup[playerid] = 0;
  pickup = CreatePickup(bla...bla...bla);
  return 1;
}
Hope you understand me, an hope this helped...
Reply
#5

If something wrong and you dont get it send me your script, and ill make this...
Reply
#6

Thanks, but this really was my only problem. And again, thank you for your help! ^^
Reply
#7

Your welcome.

just tell me in PM if you are stuck at this.
Reply
#8

Again, thank you for your help. But regarding the forum rules....I have to post the best solution I found.
Look at this, it's really dumb that I didn't notice this one at first:
Pawno
Код:
//Everything armor...
new Rapmore;
new Vagomore;
new Chickenarmor;
new Bikerarmor;
new Coparmor;
new Ballasarmor;
new Triadarmor;
new Aztecaarmor;
new Militaryarmor;
new Grovearmor;

halt(seconds)
{
	new _newTime[4], _oldTime[4];
	gettime(_oldTime[0], _oldTime[1], _oldTime[2]);
	_oldTime[3] = _oldTime[2] + (_oldTime[1] * 60) + (_oldTime[0] * 600);

	while(_newTime[3] != (_oldTime[3] + seconds))
	{
		gettime(_newTime[0], _newTime[1], _newTime[2]);
		_newTime[3] = _newTime[2] + (_newTime[1] * 60) + (_newTime[0] * 600);
	}
}
public OnGameModeInit()
{
    Chickenarmor = CreatePickup( 1242,3,446.6916,-81.2990,999.1238);//Chicken armour
	Bikerarmor = CreatePickup( 1242,3,310.6360,301.7459,1002.8789);//Biker armour
	Coparmor = CreatePickup( 1242,3,326.8654,308.1776,998.7217);//Cop armour
	Ballasarmor = CreatePickup( 1242,3,367.7687,1430.1815,1080.8944);//Ballas armour
	Triadarmor = CreatePickup( 1242,3,2334.0957,-1136.2804,1050.2666);//Triad armour
	Aztecaarmor = CreatePickup( 1242,3,302.5577,1473.7452,1079.8285);//Azteca armour
	Militaryarmor = CreatePickup( 1242,3,343.0332,160.1555,1019.5484);//Military armour
	Grovearmor = CreatePickup(1242,3,2450.6372,-1686.6973,1012.8759);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)

{
  	

  
  

  for(new iPlayer = 0 ; iPlayer < MAX_PLAYERS; iPlayer++)

	{
	if(gTeam[iPlayer]==TEAM_GROVE)
	  {  DestroyPickup(Grovearmor);
			halt(1);
			Grovearmor = CreatePickup(1242,3,2450.6372,-1686.6973,1012.8759);
	  }
	  else if(gTeam[iPlayer]==TEAM_BALLA)
	  {  DestroyPickup(Ballasarmor);
			halt(1);
			Ballasarmor = CreatePickup( 1242,3,367.7687,1430.1815,1080.8944);//Ballas armour
	  }
    else if(gTeam[iPlayer]==TEAM_PIZZA)
	  {  DestroyPickup(Chickenarmor);
	  	halt(1);
	  	Chickenarmor = CreatePickup( 1242,3,446.6916,-81.2990,999.1238);//Chicken armour
	  }
	  else if(gTeam[iPlayer]==TEAM_COPS)
	  {  DestroyPickup(Coparmor);
			halt(1);
			Coparmor = CreatePickup( 1242,3,326.8654,308.1776,998.7217);//Cop armour
	  }
	  else if(gTeam[iPlayer]==TEAM_BIKERS)
	  {  DestroyPickup(Bikerarmor);
			halt(1);
	  }
	  else if(gTeam[iPlayer]==TEAM_RAPPERS)
	  {  DestroyPickup(Rapmore);
			halt(1);
			Rapmore = CreatePickup(1242,2,1279.0282,-813.1508,1085.2317);
	  }
	  else if(gTeam[iPlayer]==TEAM_AZTECAS)
	  {  DestroyPickup(Aztecaarmor);
			halt(1);
			Aztecaarmor = CreatePickup( 1242,3,302.5577,1473.7452,1079.8285);//Azteca armour
	  }
	  else if(gTeam[iPlayer]==TEAM_VAGOS)
	  {  DestroyPickup(Bikerarmor);
			halt(1);
			Vagomore = CreatePickup(1242,2,2346.9578,-1185.1136,1031.5497);
	  }
	  else if(gTeam[iPlayer]==TEAM_MILITARY)
	  {  DestroyPickup(Militaryarmor);
			halt(1);
			Militaryarmor = CreatePickup( 1242,3,343.0332,160.1555,1019.5484);//Military armour
	  }
	  else if(gTeam[iPlayer]==TEAM_TRIADS)
		{  DestroyPickup(Triadarmor);
			halt(1);
			Triadarmor = CreatePickup( 1242,3,2334.0957,-1136.2804,1050.2666);//Triad armour
	  }
return 1;
}
Well, sorry in case some return 1; is wrong...
And you have to define the teams and do the whole gTeam code...
Hehe
Cheers
TheUllas
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)