07.03.2014, 19:10
eu gostaria se um player normal digita-se o comando fala-se que ele nгo e ADM.
Code:
#include <a_samp> public OnPlayerCommandText( playerid, cmdtext[]) { if ( strcmp( cmdtext, "/mudarplaca", true) >= 3) { ShowPlayerDialog(playerid, 10101, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite sua Placa:\n\nMaximo de 8 Caracteres", "Mudar", "Cancelar"); return 1; } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { 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; }