REP+ Map icon for car export not appearing
#1

Hey.
Here is the car export FS by Sandra >> https://sampforum.blast.hk/showthread.php?tid=28981
Im running my server on 0.3.7 and when the car export game starts it should show a yellow icon on map, but in my case it is not being shown!
Without the icon its impossible to find the car within 10 mins or i dont even know whether the random car has been generated or not because of no icon on map
So please help me to fix this
I will give rep+ for the guy who fix this
thank you
Reply
#2

Help please ?
Reply
#3

OnTopic:The FS is outdated. Put this in function StartNewGame() after line 707 (make sure it has correct identation)
PHP Code:
        new Float:ExportCarPos[3];
        
GetVehiclePos(ExportVehicle,ExportCarPos[0],ExportCarPos[1],ExportCarPos[2]);
        for(new 
iGetPlayerPoolSize(); i++)
        {
            
SetPlayerMapIcon(i99ExportCarPos[0], ExportCarPos[1], ExportCarPos[2], 440MAPICON_GLOBAL);
        } 
OffTopic:Really, this FS is very, very outdated. Better make yourself one. You will get a better result.
Reply
#4

Quote:
Originally Posted by 10MIN
View Post
OnTopic:The FS is outdated. Put this in function StartNewGame() after line 707 (make sure it has correct identation)
PHP Code:
        new Float:ExportCarPos[3];
        
GetVehiclePos(ExportVehicle,ExportCarPos[0],ExportCarPos[1],ExportCarPos[2]);
        for(new 
iGetPlayerPoolSize(); i++)
        {
            
SetPlayerMapIcon(i99ExportCarPos[0], ExportCarPos[1], ExportCarPos[2], 440MAPICON_GLOBAL);
        } 
OffTopic:Really, this FS is very, very outdated. Better make yourself one. You will get a better result.
I changed it and here is the code and error i got!

Code:
StartNewGame()
{
	if(CanPlay == 1)
	{
		new string[128];
		ExportVehicleValue = MinCarValue+(random(MaxCarValue-MinCarValue));
		SendClientMessageToAll(COLOR_YELLOW, "A new Export-Game has started!");
		ChooseExportCar();
		format(string, sizeof(string), "This time the ExportCompany wants a %s, the value of this car is: $%d,-", VehNames[GetVehicleModel(ExportVehicle) - 400], ExportVehicleValue);
		SendClientMessageToAll(COLOR_YELLOW, string);
		SendClientMessageToAll(COLOR_YELLOW, "The car is indicated with a yellow marker, the player who takes it first to the Export-place wins!");
		for(new i; i<Max_Players; i++)
		{
		    SetVehicleParamsForPlayer(ExportVehicle, i, 1, 0);
		}
		IsGameStarted = 1;
		GameTimeLeft = RoundTime;
		RoundTimer = SetTimer("StopGame", 10000, 1);
 }
 		new Float:ExportCarPos[3];
        GetVehiclePos(ExportVehicle,ExportCarPos[0],ExportCarPos[1],ExportCarPos[2]);
        for(new i; i < GetPlayerPoolSize(); i++)
        {
            SetPlayerMapIcon(i, 99, ExportCarPos[0], ExportCarPos[1], ExportCarPos[2], 44, 0, MAPICON_GLOBAL);
		}
}
Error :-
Code:
C:\Users\Rohit\Desktop\World of Fun\filterscripts\CarExport.pwn(708) : warning 217: loose indentation
C:\Users\Rohit\Desktop\World of Fun\filterscripts\CarExport.pwn(710) : error 017: undefined symbol "GetPlayerPoolSize"
I'd be much happy if you fix the indentation and code for me
Reply
#5

You need to update your include

Haven't really check your code I just indented it.

PHP Code:
StartNewGame()
{
    if(
CanPlay == 1)
    {
        new 
string[128];
        
ExportVehicleValue MinCarValue+(random(MaxCarValue-MinCarValue));
        
SendClientMessageToAll(COLOR_YELLOW"A new Export-Game has started!");
        
ChooseExportCar();
        
format(stringsizeof(string), "This time the ExportCompany wants a %s, the value of this car is: $%d,-"VehNames[GetVehicleModel(ExportVehicle) - 400], ExportVehicleValue);
        
SendClientMessageToAll(COLOR_YELLOWstring);
        
SendClientMessageToAll(COLOR_YELLOW"The car is indicated with a yellow marker, the player who takes it first to the Export-place wins!");
        for(new 
iMAX_PLAYERSi++)
        {
            
SetVehicleParamsForPlayer(ExportVehiclei10);
        }
        
IsGameStarted 1;
        
GameTimeLeft RoundTime;
        
RoundTimer SetTimer("StopGame"100001);
    }
    new 
Float:ExportCarPos[3];
    
GetVehiclePos(ExportVehicle,ExportCarPos[0],ExportCarPos[1],ExportCarPos[2]);
    for(new 
iGetPlayerPoolSize(); i++)
    {
        
SetPlayerMapIcon(i99ExportCarPos[0], ExportCarPos[1], ExportCarPos[2], 440MAPICON_GLOBAL);
    }

Reply
#6

Quote:
Originally Posted by ISmokezU
View Post
You need to update your include

Haven't really check your code I just indented it.

PHP Code:
StartNewGame()
{
    if(
CanPlay == 1)
    {
        new 
string[128];
        
ExportVehicleValue MinCarValue+(random(MaxCarValue-MinCarValue));
        
SendClientMessageToAll(COLOR_YELLOW"A new Export-Game has started!");
        
ChooseExportCar();
        
format(stringsizeof(string), "This time the ExportCompany wants a %s, the value of this car is: $%d,-"VehNames[GetVehicleModel(ExportVehicle) - 400], ExportVehicleValue);
        
SendClientMessageToAll(COLOR_YELLOWstring);
        
SendClientMessageToAll(COLOR_YELLOW"The car is indicated with a yellow marker, the player who takes it first to the Export-place wins!");
        for(new 
iMAX_PLAYERSi++)
        {
            
SetVehicleParamsForPlayer(ExportVehiclei10);
        }
        
IsGameStarted 1;
        
GameTimeLeft RoundTime;
        
RoundTimer SetTimer("StopGame"100001);
    }
    new 
Float:ExportCarPos[3];
    
GetVehiclePos(ExportVehicle,ExportCarPos[0],ExportCarPos[1],ExportCarPos[2]);
    for(new 
iGetPlayerPoolSize(); i++)
    {
        
SetPlayerMapIcon(i99ExportCarPos[0], ExportCarPos[1], ExportCarPos[2], 440MAPICON_GLOBAL);
    }

Indented. But it still gives me this error :-

Code:
C:\Users\Rohit\Desktop\World of Fun\filterscripts\CarExport.pwn(709) : error 017: undefined symbol "GetPlayerPoolSize".
Which include should i update to fix this? Im running on 0.3.7 latest.
Reply
#7

Hm, This is the function of a samp which is the samp include, basically you've the old version of samp includes,
however try to install the newest version of samp, and then put your gamemode, filterscripts and other things to the newer samp, place the include you need only, not the others, and then try to compile with the newer pawno.
Reply
#8

Quote:
Originally Posted by 10MIN
View Post
OnTopic:The FS is outdated. Put this in function StartNewGame() after line 707 (make sure it has correct identation)
PHP Code:
        new Float:ExportCarPos[3];
        
GetVehiclePos(ExportVehicle,ExportCarPos[0],ExportCarPos[1],ExportCarPos[2]);
        for(new 
iGetPlayerPoolSize(); i++)
        {
            
SetPlayerMapIcon(i99ExportCarPos[0], ExportCarPos[1], ExportCarPos[2], 440MAPICON_GLOBAL);
        } 
OffTopic:Really, this FS is very, very outdated. Better make yourself one. You will get a better result.
Unfortunate to say it didnt work guys...thats not the right solution please help!
Reply
#9

It did not work, anyone got the right solution please
Reply
#10

GUYS none of this worked, please help me and get your REP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)