28.09.2014, 19:28
Hello Everyone, this is first time i'm posting something on SA-MP forums...
I'm editing a gamemode script, and i've got some problems in it cause its little older (0.3x i think)
In Gamemode there is a /toys system but the problem is it edit toys with parameters not like newly feature of SA-MP (GUI editing system)...
Here you can see its code
How can i change it to GUI editing SYSTEM...
And my Next Problem is when i use /trackcar in game it shows a dialog with my cars and when i click one of my car it say " Your vehicle is located in . "
It dont tell me the place name
here you can see its DIALOG code
How to FIX it
Waiting for being Helped
Sorry for my Bad English.
I'm editing a gamemode script, and i've got some problems in it cause its little older (0.3x i think)
In Gamemode there is a /toys system but the problem is it edit toys with parameters not like newly feature of SA-MP (GUI editing system)...
Here you can see its code
Код:
if((dialogid == EDITTOYS)) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, EDITTOYSBONE, DIALOG_STYLE_LIST, "Select a Bone", "Spine\nHead\nLeft upper arm\nRight upper arm\nLeft hand\nRight hand\nLeft thigh\nRight thigh\nLeft foot\nRight foot\nRight calf\nLeft calf\nLeft forearm\nRight forearm\nLeft clavicle\nRight clavicle\nNeck\nJaw", "Select", "Cancel"); } else if(listitem == 1) { ShowPlayerDialog(playerid, EDITTOYSPX, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an X Offset from -100 to 100 (Ex: 55, or 33.4)", "Enter", "Cancel"); } else if(listitem == 2) { ShowPlayerDialog(playerid, EDITTOYSPY, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an Y Offset from -100 to 100 (Ex: 55, or 33.4)", "Enter", "Cancel"); } else if(listitem == 3) { ShowPlayerDialog(playerid, EDITTOYSPZ, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an Z Offset from -100 to 100 (Ex: 55, or 33.4)", "Enter", "Cancel"); } else if(listitem == 4) { ShowPlayerDialog(playerid, EDITTOYSRX, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an X Rotation from 0 to 360 (Ex: 90, or 270.4)", "Enter", "Cancel"); } else if(listitem == 5) { ShowPlayerDialog(playerid, EDITTOYSRY, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an Y Rotation from 0 to 360 (Ex: 90, or 270.4)", "Enter", "Cancel"); } else if(listitem == 6) { ShowPlayerDialog(playerid, EDITTOYSRZ, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an Z Rotation from 0 to 360 (Ex: 90, or 270.4)", "Enter", "Cancel"); } else if(listitem == 7) { ShowPlayerDialog(playerid, EDITTOYSSX, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an X Scale amount from 0.5 to 2 (Ex: 0.74, or 1.7)", "Enter", "Cancel"); } else if(listitem == 8) { ShowPlayerDialog(playerid, EDITTOYSSY, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an Y Scale amount from 0.5 to 2 (Ex: 0.74, or 1.7)", "Enter", "Cancel"); } else if(listitem == 9) { ShowPlayerDialog(playerid, EDITTOYSSZ, DIALOG_STYLE_INPUT, "Toy Menu: Edit", "Input an Z Scale amount from 0.5 to 2 (Ex: 0.74, or 1.7)", "Enter", "Cancel"); } }
How can i change it to GUI editing SYSTEM...

And my Next Problem is when i use /trackcar in game it shows a dialog with my cars and when i click one of my car it say " Your vehicle is located in . "
It dont tell me the place name
here you can see its DIALOG code
Код:
if(dialogid == TRACKCAR) { if(response == 1) { for(new i = 0; i < MAX_PLAYERVEHICLES; i++) { if(listitem == i) { new Float: carPos[3]; if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID) { GetVehiclePos(PlayerVehicleInfo[playerid][i][pvId], carPos[0], carPos[1], carPos[2]); if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || gPlayerCheckpointStatus[playerid] != CHECKPOINT_NONE || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) { SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first with /killcheckpoint (you either have material packages, or another existing checkpoint)."); } else { SetPVarInt(playerid, "TrackCar", 1); new zone[MAX_ZONE_NAME]; // Get3DZone(carPos[0], carPos[1], carPos[2], zone, sizeof(zone)); format(string, sizeof(string), "Your vehicle is located in %s.", zone); SendClientMessageEx(playerid, COLOR_YELLOW, string); SetPlayerCheckpoint(playerid, carPos[0], carPos[1], carPos[2], 15.0); SendClientMessageEx(playerid, COLOR_WHITE, "Hint: Make your way to the checkpoint to find your vehicle!"); } } else if(PlayerVehicleInfo[playerid][i][pvImpounded]) SendClientMessageEx(playerid, COLOR_WHITE, "You can not track an impounded vehicle. If you wish to reclaim it, do so at the DMV in Dillimore."); else SendClientMessageEx(playerid, COLOR_WHITE, "You can not track a non-existent vehicle."); } } } }
How to FIX it

Waiting for being Helped
Sorry for my Bad English.