27.02.2011, 14:49
Hello guys.. Again a comand doesn't work for me. When i check if the player is in certain vehicle it just skips this part:
What could be the problem?
Код:
GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, 509 | 481 | 510 | 462 | 448 | 581 | 522 | 461 | 521 | 523 | 463 | 586 | 468 | 471)) { SendClientMessage(playerid,COLOR_BRIGHTRED,"Љo komandu nevar izmantot kamēr atrodies uz motocikla."); return 1; }
Код:
if(strcmp(cmdtext, "/neon 2", true)==0) { if(GetPlayerScore(playerid) >= 7) { if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid,COLOR_BRIGHTRED,"Tev jāatrodas maљīnā lai izmantotu љo komandu."); return 1; } GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, 509 | 481 | 510 | 462 | 448 | 581 | 522 | 461 | 521 | 523 | 463 | 586 | 468 | 471)) { SendClientMessage(playerid,COLOR_BRIGHTRED,"Љo komandu nevar izmantot kamēr atrodies uz motocikla."); return 1; } GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, 592 | 577 | 511 | 512 | 593 | 553 | 476 | 519 | 460 | 513 | 548 | 425 | 417 | 487 | 488 | 497 | 562 | 447 | 469)) { SendClientMessage(playerid,COLOR_BRIGHTRED,"Љo komandu nevar izmantot kamēr atrodies iekљ helikoptera."); return 1; } SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon2", neon2[playerid] = CreateObject(18647,0,0,0,0,0,0)); SetPVarInt(playerid, "neon3", neon3[playerid] = CreateObject(18647,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xFFFFFFAA, "Neon installed"); } else { SendClientMessage(playerid, COLOR_BRIGHTRED, "Љo kommandu var izmantot tikai no 7. līmeņa."); } return 1; }