SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 31/03/2011, 02:55 PM   #1
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Question Vehicle system. Help

I am using a system where you can have one car, but I want to do that you can have two. And puts on only one car. How to do that puts two cars? This is a bad scripts. Thanks!!
Code:
stock Check(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    for(new i = 1; i < sizeof(CarInfo); i++)
	    {
	        new playername[MAX_PLAYER_NAME];
	        GetPlayerName(playerid,playername,sizeof(playername));
	        if(strcmp(playername,CarInfo[i][cOwner],true)==0)
	        {
	            playerDB[playerid][tr] = i;
				return i;
	        }
 		}
	}
	return 1;
}
Code:
stock Check2(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    for(new i = 1; i < sizeof(CarInfo); i++)
	    {
	        new playername[MAX_PLAYER_NAME];
	        GetPlayerName(playerid,playername,sizeof(playername));
	        if(strcmp(playername,CarInfo[i][cOwner],true)==0)
	        {
 //this place is bad for me
		if(playerDB[playerid][tr]!=i)
		{
	            playerDB[playerid][tr2] = i;
	            }
				return i;
	        }
 		}
	}
	return 1;
}
gedux123775 is offline  
 

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
[FilterScript] Simple vehicle plate system [based on vehicle ID] Ivan_Pantovic Filterscripts 18 08/04/2012 12:43 PM
Vehicle System Rp MrLeNy Help Archive 8 13/03/2010 07:41 PM
[FilterScript] [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- Backwardsman97 Filterscripts 34 07/08/2009 12:37 PM
[FilterScript] [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- Backwardsman97 Filterscripts 7 06/08/2009 09:52 AM
Help with vehicle system coole210 Help Archive 4 10/06/2009 03:33 AM


All times are GMT. The time now is 12:37 PM.


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