[HELP]HELP WITH EASY_MYSQL
#1

Please con vert these scripts to easy-mysql compatible.

Код:
  	if(IsPlayerConnected(playerid))
   	{
	    new rows, fields;
 		cache_get_data(rows, fields);
 		if(!rows)
		{
  			new EscName[MAX_PLAYER_NAME], Query[160];
	    	mysql_real_escape_string(pName(playerid), EscName);
		    for(new i = 0; i < 10; i++)
		    {


				PlayerAttatchedObjects[playerid][pmodel][i] = 0;
			    PlayerAttatchedObjects[playerid][pbone][i] = 0;
			    PlayerAttatchedObjects[playerid][pfX][i] = 0;
			    PlayerAttatchedObjects[playerid][pfY][i] = 0;
			    PlayerAttatchedObjects[playerid][pfZ][i] = 0;
			    PlayerAttatchedObjects[playerid][prX][i] = 0;
			    PlayerAttatchedObjects[playerid][prY][i] = 0;
			    PlayerAttatchedObjects[playerid][prZ][i] = 0;
			    PlayerAttatchedObjects[playerid][psX][i] = 0;
			    PlayerAttatchedObjects[playerid][psY][i] = 0;
			    PlayerAttatchedObjects[playerid][psZ][i] = 0;
			    PlayerAttatchedObjects[playerid][pUsingSlot][i] = 0;
			}
		}
   		else
   		{
   		    new Data[50];
   		    for(new x=0; x<rows; x++)
   		    {
	   		    cache_get_field_content(x, "model", Data), 						PlayerAttatchedObjects[playerid][pmodel][x]  = strval(Data);
	   		    cache_get_field_content(x, "bone", Data), 						PlayerAttatchedObjects[playerid][pbone][x] = strval(Data);
	   		    cache_get_field_content(x, "fX", Data),							PlayerAttatchedObjects[playerid][pfX][x] = floatstr(Data);
	   		    cache_get_field_content(x, "fY", Data),							PlayerAttatchedObjects[playerid][pfY][x] = floatstr(Data);
	   		    cache_get_field_content(x, "fZ", Data),							PlayerAttatchedObjects[playerid][pfZ][x] = floatstr(Data);
	   		    cache_get_field_content(x, "rX", Data),							PlayerAttatchedObjects[playerid][prX][x] = floatstr(Data);
	   		    cache_get_field_content(x, "rY", Data),							PlayerAttatchedObjects[playerid][prY][x] = floatstr(Data);
	   		    cache_get_field_content(x, "rZ", Data), 						PlayerAttatchedObjects[playerid][prZ][x] = floatstr(Data);
	   		    cache_get_field_content(x, "sX", Data),							PlayerAttatchedObjects[playerid][psX][x] = floatstr(Data);
	   		    cache_get_field_content(x, "sY", Data),							PlayerAttatchedObjects[playerid][psY][x] = floatstr(Data);
	   		    cache_get_field_content(x, "sZ", Data),							PlayerAttatchedObjects[playerid][psZ][x] = floatstr(Data);
	   		    cache_get_field_content(x, "Enabled", Data),					PlayerAttatchedObjects[playerid][pUsingSlot][x] = strval(Data);
			}
		}
  	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)