Help with..... Well Everything!
#3

Worked a treat thanks. Just got the coordinates wrong somehow

You see the way I have set the variables from the db array is that the best way? That is the way I would do it in PHP but I don't see lots of lines like that in other peoples code.

This is what I am talking about

Код:
	// EXPLANATION OF cache_get_row:
		// THE FIRST VAR IS THE ROW FOUND.
		// THE SECOND VAR IS THE COLUMN OF THE ROW.
		// THE THIRD VAR IS A TEMPORARY VAR IN WHICH I STORE THE RESULT -- AFTERWARDS I ASSIGN THAT VALUE INTO A LOCAL ONE.

		cache_get_row(0, 0, szQueryOutput); // pInternalID
		playerVariables[playerid][pInternalID] = strval(szQueryOutput);

		cache_get_row(0, 16, szQueryOutput);
		playerVariables[playerid][pHasDrivingLicence] = strval(szQueryOutput);
		
		cache_get_row(0, 3, szQueryOutput); // Skin
		playerSkin =  strval(szQueryOutput);
		
		cache_get_row(0, 4, szQueryOutput);
		playerCash = strval(szQueryOutput);
		
		cache_get_row(0, 5, szQueryOutput);
		playerSpawnX = strval(szQueryOutput);
		
		cache_get_row(0, 6, szQueryOutput);
		playerSpawnY = strval(szQueryOutput);
		
		cache_get_row(0, 7, szQueryOutput);
		playerSpawnX = strval(szQueryOutput);
		
		cache_get_row(0, 8, szQueryOutput);
		playerSpawnAngle = strval(szQueryOutput);
		
		SetSpawnInfo(playerid,0,playerSkin,playerSpawnX,playerSpawnY,playerSpawnZ,playerSpawnAngle,-1,-1,-1,-1,-1,-1);
		SpawnPlayer(playerid);
		GivePlayerMoney(playerid,playerCash);
Reply


Messages In This Thread
Help with..... Well Everything! - by liam1412 - 30.03.2013, 12:46
Re: Help with..... Well Everything! - by RajatPawar - 30.03.2013, 13:31
Re: Help with..... Well Everything! - by liam1412 - 30.03.2013, 15:03
Re: Help with..... Well Everything! - by liam1412 - 30.03.2013, 15:07
Re: Help with..... Well Everything! - by RajatPawar - 30.03.2013, 15:10
Re: Help with..... Well Everything! - by liam1412 - 30.03.2013, 15:31
Re: Help with..... Well Everything! - by Konstantinos - 30.03.2013, 15:44

Forum Jump:


Users browsing this thread: 1 Guest(s)