Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandText( playerid, cmdtext[])
- {
- if (!strcmp( cmdtext, "/mudarplaca", true))
- {
- return ShowPlayerDialog(playerid, 1010, DIALOG_STYLE_INPUT, "Sistema de Placa", " Digite sua Placa: \n\n Maximo de 8 Caracteres", "Mudar", "Cancelar");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 1010)
- {
- if(!inputtext[0] || strlen(inputtext) > 8)
- return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido.");
- #if !defined MAX_STRING
- #define MAX_STRING 128
- #endif
- static
- string[MAX_STRING]
- ;
- format(string, MAX_STRING, "Você mudou o texto de sua placa para %s.", inputtext);
- SendClientMessage(playerid, 0x33CCFFAA, string);
- PutPlayerInVehicle(playerid, SetVehiclePlateEx(GetPlayerVehicleID(playerid), inputtext), 0); //colocar player dentro do veiculo de volta
- }
- return true;
- }
- SetVehiclePlateEx(vehicleid, strplate) //funcao para trocar de placa
- {
- static
- Float:xPos,
- Float:yPos,
- Float:zPos,
- Float:aPos
- ;
- SetVehicleNumberPlate(vehicleid, strplate);
- GetVehiclePos(vehicleid, xPos, yPos, zPos);
- GetVehicleZAngle(vehicleid, aPos);
- SetVehicleToRespawn(vehicleid);
- SetVehiclePos(vehicleid, xPos, yPos, zPos);
- return SetVehicleZAngle(vehicleid, aPos), vehicleid;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement