[Ajuda] Com 2 Coisas
#4

pawn Код:
#include <a_samp>

public OnPlayerCommandText( playerid, cmdtext[])
{
    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 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 10101)
    {
        if(!response)
        {
            new string[128], Float:X, Float:Y, Float:Z, Float:angle;
            if(strlen(inputtext) < 1 || strlen(inputtext) > 8) return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido.");
            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;
}
Reply


Messages In This Thread
[Ajuda] Com 2 Coisas - by Edoli - 10.03.2011, 21:30
Re: [Ajuda] Com 2 Coisas - by JonathanFeitosa - 10.03.2011, 21:33
Re: [Ajuda] Com 2 Coisas - by Edoli - 10.03.2011, 21:38
Re: [Ajuda] Com 2 Coisas - by zSuYaNw - 10.03.2011, 21:44
Re: [Ajuda] Com 2 Coisas - by Edoli - 10.03.2011, 21:59
Re: [Ajuda] Com 2 Coisas - by JonathanFeitosa - 10.03.2011, 22:13

Forum Jump:


Users browsing this thread: 2 Guest(s)