Help me out with cars
#1

Yey me again.. LOL

So i wanted to do somthinge fun in my server like BUMP-CARS

So I do this:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{

    if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == bumpcar1 && GetPlayerVehicleID(playerid) == bumpcar && GetPlayerVehicleID(playerid) == bumpcar2 && GetPlayerVehicleID(playerid) == bumpcar3 && GetPlayerVehicleID(playerid) == bumpcar4)
    {
        TogglePlayerControllable(playerid, 1);
        SendClientMessage(playerid, COLOR_RED, "DISCLAIMER:Welcome to FUN-BUMP DEATH CHALLENGE !");
        SendClientMessage(playerid, COLOR_GREEN, "DISCLAIMER:Type /startbump to start the FUN-BUMP DEATH CHALLENGE !");
    }
    return 1;
}
But it isn't Working.. nothing
here are BUMPCARS:
pawn Код:
//DINOZO BUMPCARS - FOR PHUN!!
    bumpcar1 = AddStaticVehicle(539,1129.7681,-1260.2690,20.9070,66.2787,75,75); // dinohydro-water-bumpcar1
    bumpcar = AddStaticVehicle(539,1136.0962,-1258.2960,21.5469,66.7406,75,75); // bumpcar
    bumpcar2 = AddStaticVehicle(539,1133.6913,-1267.1262,21.5469,47.3137,75,75); // bumpcar2
    bumpcar3 = AddStaticVehicle(539,1122.9301,-1263.8661,21.5469,303.5994,75,75); // bumpcar3
    bumpcar4 = AddStaticVehicle(539,1123.4845,-1255.6188,21.5469,229.6520,75,75); // bumpcar4
And /startbump command isn't working too...
pawn Код:
if(strcmp(cmdtext, "/startbump", true) == 0)
    if(IsPlayerInVehicle(playerid, 539))
    {
        TogglePlayerControllable(playerid, 0);
    }
Anyone DARE'S to HELP??
Reply
#2

dont use && use ||
pawn Код:
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == bumpcar1 || GetPlayerVehicleID(playerid) == bumpcar || GetPlayerVehicleID(playerid) == bumpcar2 || GetPlayerVehicleID(playerid) == bumpcar3 || GetPlayerVehicleID(playerid) == bumpcar4)
{
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_RED, "DISCLAIMER:Welcome to FUN-BUMP DEATH CHALLENGE !");
SendClientMessage(playerid, COLOR_GREEN, "DISCLAIMER:Type /startbump to start the FUN-BUMP DEATH CHALLENGE !");
}
That should work, The way you were doing it was checking if thier new vehicle id is all of them ids put together
Reply
#3

Yes i already tryed with || but i fk*d somthing up so i didn't think to check twice.. thanx for now will try.. to handle the /startbump command
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)