Jump to content

Cum pot folosi sscanf drept explode?


newbie.

Recommended Posts

Cum as putea folosi aici sscanf drept explode? Ma refer la playercarmod...

 

CMD:park(playerid, params[])
	{
	        new saveQuery[700];
	          if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	        {
	            new vehicleid = GetPlayerVehicleID(playerid);
	            if(playerVariables[playerid][pCarID] == vehicleid)
	               {
	                if(playerVariables[playerid][pCarModel] >= 1 && doesVehicleExist(playerVariables[playerid][pCarID]))
	                {
	                    GetVehiclePos(playerVariables[playerid][pCarID], playerVariables[playerid][pCarPos][0], playerVariables[playerid][pCarPos][1], playerVariables[playerid][pCarPos][2]);
	                    GetVehicleZAngle(playerVariables[playerid][pCarID], playerVariables[playerid][pCarPos][3]);
	                    format(szMessage, sizeof(szMessage), "You succesfull parked your %s.", VehicleNames[playerVariables[playerid][pCarModel] - 400]);
	                    SendClientMessage(playerid, COLOR_WHITE, szMessage);
	                    format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarModel = '%d', playerCarColour1 = '%d', playerCarColour2 = '%d', playerCarPosX = '%f', playerCarPosY = '%f', playerCarPosZ = '%f', playerCarPosZAngle = '%f', playerCarMod0 = '%d', playerCarMod1 = '%d', playerCarMod2 = '%d', playerCarMod3 = '%d', playerCarMod4 = '%d', playerCarMod5 = '%d', playerCarMod6 = '%d'",playerVariables[playerid][pCarModel],
	                    playerVariables[playerid][pCarColour][0], playerVariables[playerid][pCarColour][1],
	                    playerVariables[playerid][pCarPos][0], playerVariables[playerid][pCarPos][1], playerVariables[playerid][pCarPos][2], playerVariables[playerid][pCarPos][3], playerVariables[playerid][pCarMods][0], playerVariables[playerid][pCarMods][1], playerVariables[playerid][pCarMods][2], playerVariables[playerid][pCarMods][3],
	                    playerVariables[playerid][pCarMods][4], playerVariables[playerid][pCarMods][5], playerVariables[playerid][pCarMods][6]);
	                    format(saveQuery, sizeof(saveQuery), "%s, playerCarPaintJob = '%d', playerCarLock = '%d'", saveQuery, playerVariables[playerid][pCarPaintjob], playerVariables[playerid][pCarLock]);
	                    format(saveQuery, sizeof(saveQuery), "%s, playerCarMod7 = '%d', playerCarMod8 = '%d', playerCarMod9 = '%d', playerCarMod10 = '%d', playerCarMod11 = '%d', playerCarMod12 = '%d'", saveQuery,
	                     playerVariables[playerid][pCarMods][7], playerVariables[playerid][pCarMods][8], playerVariables[playerid][pCarMods][9], playerVariables[playerid][pCarMods][10], playerVariables[playerid][pCarMods][11], playerVariables[playerid][pCarMods][12]);
	                    format(saveQuery, sizeof(saveQuery), "%s WHERE playerID = '%d'", saveQuery, playerVariables[playerid][pInternalID]);
	                    mysql_tquery(handle,saveQuery);
	                    SetVehicleToRespawnEx(vehicleid);

 

Edited by newbie.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.