26.01.2010, 16:11
Hey, I made a topic some hours ago to fix the code because it wouldnt compile...
Now when the code is fixed, it doesn't work.
I can compile, but it doesnt work ingame.
When i type /p This is NWA AirForce wondering if pilot chat works?
It does nothing.
This is what happens after ive typed it: (At the below pic i already had typed it then put it into chat box again for you to see what i typed)
Nothing! Even if i type it again and again and again, nothing! It doesnt even send a empty message!
And i have hydra defined in the loop! (doesnt work for other air vehicles as well)
Heres my code:
Please help me fix this, Peace
Now when the code is fixed, it doesn't work.
I can compile, but it doesnt work ingame.
When i type /p This is NWA AirForce wondering if pilot chat works?
It does nothing.
This is what happens after ive typed it: (At the below pic i already had typed it then put it into chat box again for you to see what i typed)
Nothing! Even if i type it again and again and again, nothing! It doesnt even send a empty message!
And i have hydra defined in the loop! (doesnt work for other air vehicles as well)
Heres my code:
Код:
dcmd_p(playerid,params[]) { new vehicleid; for (new i = 0; i < MAX_PLAYERS; i++) { vehicleid = GetPlayerVehicleID(i); if(strlen(params) == 0) return SendClientMessage(playerid, red, "Usage: /p (Text)"); if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetVehicleModel(vehicleid) == 417 || GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 447 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 577 || GetVehicleModel(vehicleid) == 511 || GetVehicleModel(vehicleid) == 512 || GetVehicleModel(vehicleid) == 593 || GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 553 || GetVehicleModel(vehicleid) == 476 || GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 460 || GetVehicleModel(vehicleid) == 513 || GetVehicleModel(vehicleid) == 548 || GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 417 || GetVehicleModel(vehicleid) == 487 || GetVehicleModel(vehicleid) == 488 || GetVehicleModel(vehicleid) == 497 || GetVehicleModel(vehicleid) == 563 || GetVehicleModel(vehicleid) == 447 || GetVehicleModel(vehicleid) == 469) { new string[128]; new plName[MAX_PLAYER_NAME]; GetPlayerName(playerid, plName, sizeof(plName)); format(string,sizeof(string),"Pilot Chat: %s: %s",plName, params); SendClientMessage(i, green, string); } return 1; } return 1; }