Vehicle system. Help
#1

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!!
Код:
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;
}
Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)