SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/01/2013, 01:37 AM   #1
wouter0100
Big Clucker
 
wouter0100's Avatar
 
Join Date: Aug 2010
Posts: 164
Reputation: 0
Default Pickup does not appear.

Hey,

Currently I'm working on one of my favorite gamemodes but since around the 2 weeks, some Pickups does not appear in the map anymore.

Here my code:
Code:
stock CreateNewPickup(id, Float:x, Float:y, Float:z)
{
	//Creating pickups.
	new pickup, Text3D:text;
	if(id == 1)
	{
	    pickup = CreatePickup(1239, 1, x, y, z, -1); //1240 -> 1239
	    text = Create3DTextLabel("[REPAIR]", 0x008080FF, x, y, z+0.3,40.0,0);
	    Aantalpickup++;
	    Aantalpickup1[Aantalpickup][pid] = pickup;
	    Aantalpickup1[Aantalpickup][ptext] = text;
	    Aantalpickup1[Aantalpickup][psoort] = 0;
	    Aantalpickup1[Aantalpickup][px] = x;
	    Aantalpickup1[Aantalpickup][py] = y;
	    Aantalpickup1[Aantalpickup][pz] = z;
	    Aantalpickup1[Aantalpickup][pdeleted] = 0;
	}else if(id == 2){
	    pickup = CreatePickup(1239, 1, x, y, z, -1); //1241 -> 1239
	    text = Create3DTextLabel("[NITRO]", 0x008080FF, x, y, z+0.3,40.0,0);
	    Aantalpickup++;
	    Aantalpickup1[Aantalpickup][pid] = pickup;
	    Aantalpickup1[Aantalpickup][ptext] = text;
	    Aantalpickup1[Aantalpickup][psoort] = 1;
 	    Aantalpickup1[Aantalpickup][px] = x;
	    Aantalpickup1[Aantalpickup][py] = y;
	    Aantalpickup1[Aantalpickup][pz] = z;
	    Aantalpickup1[Aantalpickup][pdeleted] = 0;
	}else{
	    pickup = CreatePickup(1239, 1, x, y, z, -1);
	    format(string, sizeof(string), "[%s]", VehicleNames[id-400]);
	    text = Create3DTextLabel(string, 0x008080FF, x, y, z+0.3,40.0,0);
		Carpickup[pickup][pid] = pickup;
		Carpickup[pickup][soort] = id;
		Aantalpickup++;
	    Aantalpickup1[Aantalpickup][pid] = pickup;
	    Aantalpickup1[Aantalpickup][ptext] = text;
	    Aantalpickup1[Aantalpickup][psoort] = 2;
  	    Aantalpickup1[Aantalpickup][px] = x;
	    Aantalpickup1[Aantalpickup][py] = y;
	    Aantalpickup1[Aantalpickup][pz] = z;
	    Aantalpickup1[Aantalpickup][pdeleted] = 0;
	}
	format(string, sizeof(string), "Created pickup ID: %i", pickup);
	print(string);
}
Sorry for the language, but only the last one seems to be working. When you get to the place where the REPAIR or NITRO pickup is, you will only see the TextLabel. So, the coords are right. Somebody know what I'm doing wrong here?

Thanks.
Wouter
wouter0100 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
┐Can I create an invisible pickup? ┐Puedo crear un pickup invisible? Sujer Help Archive 2 23/02/2011 02:21 PM
Enter pickup, be in car, but the pickup is visible MastahServers Help Archive 1 22/05/2010 11:04 AM
Pickup does not appear (Amount < 400) - Create pickup for specific player? Programie Help Archive 4 19/08/2009 10:50 PM
on player pickup pickup Scoots Help Archive 4 18/03/2009 07:44 PM


All times are GMT. The time now is 04:06 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.