Spawn MAX 3 Objects with MMB
#1

How i can spawn with MMB a object? (ID 1220) MAX 3x
one more piece

And you should be able to spawn again until after the death 3 objects
Reply
#2

Firstly read my signature the top of it and secondly explain a little more
Reply
#3

Who can help me
Reply
#4

Who can help me??
Reply
#5

You mean with the objects attached to the player when he spawns? Please explain more about what you want.
Reply
#6

If a user press MMB, then spawn a object befor him
but he can spawn 3 objects and not more
but after death or gespawn he can again spawn 3 objects
Reply
#7

Who can help me?
Reply
#8

on top
new ObjectCount[MAX_PLAYERS];

OnPlayerSpawn
ObjectCount[playerid] = 0;

OnPlayerKeyStateChange
pawn Код:
if(PRESSED(KEY_LOOK_BEHIND))
{
    if(ObjectCount[playerid] < 4)
    {
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid, X,Y,Z)
        CreateObject(...X,Y,Z...)
        ObjectCount[playerid] ++
    }
}
Reply
#9

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(PRESSED(KEY_LOOK_BEHIND))
	{
	if(ObjectCount[playerid] < 4)
	    {
			new Float:angle,Float:x,Float:y,Float:z;
			GetPlayerPos(playerid, x, y, z);
			angle = GetXYInFrontOfPlayer(playerid, x, y, GetOptimumRampDistance(playerid));
			angle -= 90.0;
   			if (angle < 0.0) angle += 360.0;
			z += 0.5;
			ramp=CreateObject(800, x, y, z - 0.1, 0.0, 0.0, angle+90);
			SetTimer("ramptimer",10000,0);
			ObjectCount[playerid]++;
		}
	}
	return 1;
}
How i can delete the objects ?
Reply
#10

Help me pls
how i can delete all objects?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)