[Ajuda] Troca de include
#5

@EDIT

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
YCMD:tunar(playerid, params[], help)
{
    #pragma unused params
    if (help)
        return SendClientMessage(playerid, 0xFF0000AA, "Tuna um carro e.e.");
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid,COLOR_WHITE,"[INFO] Voce nao esta em um carro.");
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        return SendClientMessage(playerid,COLOR_YELLOW,"[INFO] Voce nao e o condutor!");
    switch(GetVehicleModel(GetPlayerVehicleID(playerid))
    {
        case 411, 579, 597, 602:
        {
            ShowMenuForPlayer(TuningMenu, playerid);
            TogglePlayerControllable(playerid,0);
        }
        default: SendClientMessage(playerid,COLOR_YELLOW,"[AVISO] Nao e permitido voce modificar este veiculo");
    }
    return 1;
}
coloquei so alguns modelos, se quiser acresentar mais n e dificil...

so estudar como usar switch.
Cara, eu peguei os ids e coloquei ali, assim:
pawn Код:
YCMD:tunar(playerid, params[], help)
{
    #pragma unused params
    if (help)
        return SendClientMessage(playerid, 0xFF0000AA, "Tuna um carro");
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid,COLOR_WHITE,"[INFO] Vocк nгo estб em um carro.");
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        return SendClientMessage(playerid,COLOR_YELLOW,"[INFO] Vocк nгo й o condutor!");
    switch(GetVehicleModel(GetPlayerVehicleID(playerid))
    { //LINHA 2503
        case 562, 565, 559, 561, 560, 575, 534, 567, 536, 535, 576, 411, 579, 597, 602, 496, 518, 527, 589, 597, 419, 533, 526, 474, 545, 517, 410, 600, 436, 580, 439, 549, 491, 445, 604, 507, 585, 587, 466, 492, 546, 551, 516, 467, 426, 547, 405, 409, 556, 566, 540, 421, 529, 431, 438, 437, 420, 525, 552, 416, 433, 427, 490, 528, 407, 544, 470, 598, 596, 597, 599, 601, 428, 499, 609, 524, 578, 486, 406, 573, 455, 588, 403, 514, 423, 414, 443, 515, 456, 422, 482, 530, 418, 572, 413, 440, 543, 583, 478, 554, 402, 542, 603, 475, 568, 504, 457, 483, 508, 429, 541, 415, 480, 434, 506, 451, 555, 477, 400, 404, 489, 479, 442, 458, 558: //LINHA 2504
        { //LINHA 2505
            ShowMenuForPlayer(TuningMenu, playerid);
            TogglePlayerControllable(playerid,0);
        }
        default: SendClientMessage(playerid,COLOR_YELLOW,"[ERRO] Nгo й possivel modificar este veiculo.");
    }
    return 1;
}
Mas na hora de compilar deu os seguintes erros:
Код:
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2503) : error 001: expected token: ")", but found "{"
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2504) : error 040: duplicate "case" label (value 597)
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : warning 215: expression has no effect
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2505) : error 001: expected token: ";", but found ":"
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2510) : error 014: invalid statement; not in switch
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2510) : error 029: invalid expression, assumed zero
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2511) : warning 209: function "@_yCtunar" should return a value
C:\Users\GUILHERME\Downloads\eXtremeFR 2013x ES\filterscripts\Tunar.pwn(2512) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply


Messages In This Thread
Troca de include - by GuiihCamargo - 14.01.2014, 07:05
Re: Troca de include - by Diogo123 - 14.01.2014, 09:43
Re: Troca de include - by kevinho.007 - 14.01.2014, 10:57
Re: Troca de include - by PT - 14.01.2014, 17:04
Re: Troca de include - by GuiihCamargo - 14.01.2014, 17:24
Re: Troca de include - by PT - 14.01.2014, 18:37
Re: Troca de include - by GuiihCamargo - 14.01.2014, 19:15
Re: Troca de include - by Schocc - 14.01.2014, 19:22
Re: Troca de include - by GuiihCamargo - 14.01.2014, 19:25
Re: Troca de include - by Schocc - 14.01.2014, 19:28

Forum Jump:


Users browsing this thread: 4 Guest(s)