Originally Posted by Jonathan_Feitosa
Coloca no GM tao simples mem. aki oh
No OnPlayerCommandText
pawn Код:
if ( strcmp( cmdtext, "/mudarplaca", true) == 0) { ShowPlayerDialog(playerid, 10101, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite sua Placa:\n\nMaximo de 8 Caracteres", "Mudar", "Cancelar"); return 1; } return 1; }
Em OnDialogResponse
pawn Код:
if(dialogid == 10101) { new string[128], Float:X, Float:Y, Float:Z, Float:angle; if(strlen(inputtext) < 1 || strlen(inputtext) > 8) return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido."); else { format(string, sizeof(string), "Vocк mudou o texto de sua placa para '%s'.", inputtext); SendClientMessage(playerid, 0x33CCFFAA, string); GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, angle); SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); GetPlayerPos(playerid, X, Y, Z); SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z); SetVehicleZAngle(GetPlayerVehicleID(playerid), angle); PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0); SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2); } } return 1; }
Sу o.o
Manda o teu /comprar na 24-7 aew q faco para vc
|