need help!!!
#1

Hello all!

I need a code!

AddStaticPickup(1239,2,2227.3433,-1159.1433,25.7836); // This is a info pickup

When i reach this pickup, I want it to SendClientMessages, any help with this?
Reply
#2

Код:
 			else if (PlayerToPoint(8.0, playerid,x,y,z))
			{
			  GameTextForPlayer(playerid, "~w~Your Tekst", 5000, 1);
			  SetPlayerInterior(playerid,4);
			  SetPlayerPos(playerid,x,y,z);
			}
or this... i dont know exstatly what do you mean...

Код:
 			else if (PlayerToPoint(8.0, playerid,x,y,z))
			{
			  SendClientMessage(playerid, COLOR_GREEN, "you tekst"); 
			  SetPlayerInterior(playerid,4);
			  SetPlayerPos(playerid,x,y,z);
			}
Reply
#3

There's plenty of ways to do it, you can do it in my way if you want...


At the top of your script , under all of these defines and includes add
Код:
new info;
// change the name to whatever you want

Then OnGameModeInit add

Код:
info = CreatePickup(1239,2,2227.3433,-1159.1433,25.7836);
OnPlayerPickupPickup

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
}
  if(pickupid == info)
{	     
        SendClientMessage(playerid,0x00F600AA, "text of the message inside the brackets"); 
}
	return 1;
}
// it will give a message in color green change it to whatever you want


As I said there's plenty of ways to do it, I prefer this one
Reply
#4

Yes there are many ways to do it...

this or my are good ways
Reply
#5

Quote:
Originally Posted by Toniu_
There's plenty of ways to do it, you can do it in my way if you want...


At the top of your script , under all of these defines and includes add
Код:
new info;
// change the name to whatever you want

Then OnGameModeInit add

Код:
info = CreatePickup(1239,2,2227.3433,-1159.1433,25.7836);
OnPlayerPickupPickup

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
}
  if(pickupid == info)
{	     
        SendClientMessage(playerid,0x00F600AA, "text of the message inside the brackets"); 
}
	return 1;
}
// it will give a message in color green change it to whatever you want


As I said there's plenty of ways to do it, I prefer this one
Hey, Toniu_
I did by your way and then i get this warning compiling:

warning 209: function "OnPlayerPickUpPickup" should return a value

Thanks for your guys Attention
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)