if( newstate == PLAYER_STATE_ENTER_VEHICLE_DRIVER ) { Vehicleid[ playerid ] = GetPlayerVehicleID( playerid ); Model[ playerid ] = GetVehicleModel( Vehicleid[ playerid ] ); if(Model[ playerid ] == 403 || 406 || 407 || 408 || 431 || 427 || 428 || 437 || 433 || 443 || 455 || 456 || 486 || 515 || 524 || 532 || 544 || 573 || 578 || 601) //C CATEGORY DRIVING LICENSE CHECK { if(PlayerInfo[playerid][CarC] != 1) { RemovePlayerFromVehicle( playerid ); GameTextForPlayer(playerid,"~r~Neturite C kategorijos vairuotojo pazymejimo",3000,3); } } else if(Model[ playerid ] == 461 || 463 || 468 || 521 || 522 || 523 || 581) // A Category Driving license check { if(PlayerInfo[playerid][CarA] != 1) { RemovePlayerFromVehicle( playerid ); GameTextForPlayer(playerid,"~r~Neturite A kategorijos vairuotojo pazymejimo",3000,3); } } else if(Model[ playerid ] == 417 || 425 || 447 || 460 || 464 || 465 || 469 || 476 || 487 || 488 || 497 || 501 || 511 || 512 || 513 || 519 || 520 || 548 || 553 || 563 || 577 || 592 || 593)//PILOT License check { } else if(Model[ playerid ] == 400 || 401 || 402 || 404 || 405 || 409 || 410 || 411 || 412 || 413 || 414 || 415 || 416 || 418 || 419 || 420 || 421 || 422 || 423 || 424 || 426 || 429 || 434 || 436 || 438 || 439 || 440 || 441 || 442 || 444 || 445 || 451 || 458 || 459 || 466 || 467 || 470 || 471 || 474 || 475 || 477 || 478 || 479 || 480 || 482 || 483 || 485 || 489 || 490 || 491 || 492 || 494 || 495 || 496 || 498 || 499 || 500 || 502 || 503 || 504 || 505 || 506 || 507 || 508 || 516 || 517 || 518 || 533 || 534 || 535 || 536 || 525 || 526 || 527 || 528 || 529 || 530 || 531 || 540 || 541 || 542 || 543 || 545 || 546 || 547 || 549 || 550 || 551 || 552 || 554 || 555 || 556 || 557 || 558 || 559 || 560 || 561 || 562 || 565 || 566 || 567 || 568 || 572 || 574 || 575 || 576 || 579 || 580 || 582 || 583 || 585 || 587 || 588 || 596 || 597 || 598 || 599 || 600 || 602 || 603 || 604 || 605 || 609) { if(PlayerInfo[playerid][CarB] != 1) { RemovePlayerFromVehicle( playerid ); GameTextForPlayer(playerid,"~r~Neturite B kategorijos vairuotojo pazymejimo",3000,3); } } }
C:\Users\Cyberlord\Desktop\samp server stuff\Samp Server R4\gamemodes\RP.pwn(1125) : error 075: input line too long (after substitutions) C:\Users\Cyberlord\Desktop\samp server stuff\Samp Server R4\gamemodes\RP.pwn(1127) : error 001: expected token: ")", but found "-integer value-" C:\Users\Cyberlord\Desktop\samp server stuff\Samp Server R4\gamemodes\RP.pwn(1127) : warning 215: expression has no effect C:\Users\Cyberlord\Desktop\samp server stuff\Samp Server R4\gamemodes\RP.pwn(1127) : error 001: expected token: ";", but found ")" C:\Users\Cyberlord\Desktop\samp server stuff\Samp Server R4\gamemodes\RP.pwn(1127) : error 029: invalid expression, assumed zero C:\Users\Cyberlord\Desktop\samp server stuff\Samp Server R4\gamemodes\RP.pwn(1127) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
else if(Model[ playerid ] == 400 || 401 || 402 || 404 || 405 || 409 || 410 || 411 || 412 || 413 || 414 || 415 || 416 || 418 || 419 || 420 || 421 || 422 || 423 || 424 || 426 || 429 || 434 || 436 || 438 || 439 || 440 || 441 || 442 || 444 || 445 || 451 || 458 || 459 || 466 || 467 || 470 || 471 || 474 || 475 || 477 || 478 || 479 || 480 || 482 || 483 || 485 || 489 || 490 || 491 || 492 || 494 || 495 || 496 || 498 || 499 || 500 || 502 || 503 || 504 || 505 || 506 || 507 || 508 || 516 || 517 || 518 || 533 || 534 || 535 || 536 || 525 || 526 || 527 || 528 || 529 || 530 || 531 || 540 || 541 || 542 || 543 || 545 || 546 || 547 || 549 || 550 || 551 || 552 || 554 || 555 || 556 || 557 || 558 || 559 || 560 || 561 || 562 || 565 || 566 || 567 || 568 || 572 || 574 || 575 || 576 || 579 || 580 || 582 || 583 || 585 || 587 || 588 || 596 || 597 || 598 || 599 || 600 || 602 || 603 || 604 || 605 || 609)
else if(Model[playerid] == 400 || 401 || 402 || 404 || 405 || 409 || 410) // to about 500
{
}
else if(Model[playerid] == 502 || 503 || 504 || 505 || 506 || 507 || 508) // to about 550
{
}
else if(Model[playerid] == 551 || 552 || 554) // to the end
{
}
if(PlayerInfo[playerid][CarB] != 1)
if(!PlayerInfo[playerid][CarB] == 1)
pawn Код:
pawn Код:
pawn Код:
pawn Код:
|
if(PlayerInfo[playerid][CarB] != 1)
if(Model[ playerid ] == 400 || Model[ playerid ] == 401 || Model[ playerid ] == 402 || ...)
stock in_array(needle, const haystack[], size = sizeof haystack, &index = 0)
{
for(new i; i < size; i++)
{
if(haystack[i] == needle)
{
index = i;
return true;
}
}
return false;
}
static const validVehicles[] = {400, 401, 402, 405, 409, /*etc*/ , 609};
if(in_array(Model[ playerid ], validVehicles))
The syntax is not even correct. The correct syntax is:
pawn Код:
First, put this function somewhere in your script: pawn Код:
pawn Код:
pawn Код:
|
if( newstate == PLAYER_STATE_ENTER_VEHICLE_DRIVER ) { Vehicleid[ playerid ] = GetPlayerVehicleID( playerid ); Model[ playerid ] = GetVehicleModel( Vehicleid[ playerid ] ); if(in_array(Model[ playerid ], validVehicles)) { if(PlayerInfo[playerid][CarB] != 1) { RemovePlayerFromVehicle( playerid ); GameTextForPlayer(playerid,"~r~Neturite B kategorijos vairuotojo pazymejimo",3000,3); } } }
static const validVehicles[] = {400, 401, 402, 404, 405, 409, 410, 411, 412, 413, 414, 415, 416, 418, 419, 420, 421, 422, 423, 424, 426, 429, 434, 436, 438, 439, 440, 441, 442, 444, 451, 459, 466, 467, 470, 471, 474, 475, 477, 478, 479, 480, 482, 483, 485, 489, 490, 491, 492, 494, 495, 496, 498, 499, 500, 502, 503, 504, 505, 506, 507, 508, 516, 517, 518, 533, 534, 535, 536, 525, 526, 527, 528, 529, 530, 531, 540, 541, 542, 543, 545, 546, 547, 549, 550, 551, 552, 554, 555, 556, 557, 558, 559, 560, 561, 562, 565, 566, 567, 568, 572, 574, 575, 576, 579, 580, 582, 583, 585, 587, 588, 596, 597, 598, 599, 600, 602, 603, 604, 605, 609};
Oh, that's probably because PLAYER_STATE_ENTER_VEHICLE_DRIVER is only used internally, you will want to use PLAYER_STATE_DRIVER instead (see: https://sampwiki.blast.hk/wiki/Playerstates).
|