SA-MP Forums Archive
Tune - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tune (/showthread.php?tid=241851)



Tune - Snipa - 18.03.2011

pawn Код:
stock IsNotValidVehicle(model)
{
    switch(model)
    {
        case 448,461,462,463,468,471,509,510,521,522,523,581,586,449; //5248
    }
    return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new model = GetVehicleModel(vehicleid);
    if(!IsNotValidVehicle(model))
    {
        AddVehicleComponent(vehicleid, 1010);
    }
    return 1;
}
Код:
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5248) : error 001: expected token: ":", but found ";"
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5248) : error 036: empty statement
But, when I replace ; with :, I get


Код:
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5249) : error 029: invalid expression, assumed zero
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5249 -- 5250) : warning 215: expression has no effect
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5250) : error 001: expected token: ";", but found "return"
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5250) : warning 215: expression has no effect
C:\Users\Chris\Documents\Serv\Server\gamemodes\COS.pwn(5251) : warning 209: function "IsNotValidVehicle" should return a value
Thanks.


Re: Tune - SchurmanCQC - 18.03.2011

pawn Код:
stock IsNotValidVehicle(model)
{
    switch(model)
    {
        case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: //5248
        return 0;
    }
    return 1;
}
Btw, its [MW2]Justin from our server a long time ago. :3

EDIT: If that doesnt work, try

pawn Код:
stock IsNotValidVehicle(model)
{
    switch(model)
    {
        case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: //5248
    }
    return 0;
}



Re: Tune - Snipa - 18.03.2011

Quote:
Originally Posted by Schurman
Посмотреть сообщение
pawn Код:
stock IsNotValidVehicle(model)
{
    switch(model)
    {
        case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: //5248
        return 0;
    }
    return 1;
}
Btw, its [MW2]Justin from our server a long time ago. :3
Thanks, and hey.


Re: Tune - Marricio - 18.03.2011

pawn Код:
stock IsNotValidVehicle(model)
{
    if(model == 448 || model == 461 || model == 462 || model == 463 || model == 468 || model == 471 || model == 509 || model == 510 || model == 521 || model == 522 || model == 523 || model == 581 || model == 586 || model == 449) return 1;
    return 0;
}
[/pawn]