Spectating random player | OnPlayerPickUpPickUp
#1

So i have problems with 2 thing: spectating and onplayerpickuppickup

(1) The SendClientMessage not appearing !

So when i pick up the pick up nothing happens ...

Above the script:
pawn Код:
new info1, info2, info3, info10;
OnPlayerPickUpPickUp:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == info1) SendClientMessage(playerid,COLOR_BLUE,"[INFO] /opengarage | /closegarage");

    if(pickupid == info2) SendClientMessage(playerid,COLOR_BLUE,"[INFO] /open | /close");

    if(pickupid == info3) SendClientMessage(playerid,COLOR_BLUE,"[INFO] /open | /close");
   
    if(pickupid == info10) SendClientMessage(playerid, COLOR_RED,"[INFO] /open | /close");
   
    return 1;
}
(2) Random Spectate don't work.

[DERBY SERVER] So when someone want to spawn and if the round is still ... in progress. (s)he has to spectate other cars. IF !

Above:
pawn Код:
new CarMap1[30],CarMap2[31], CarMap3[31];
OnPlayerSpawn:
pawn Код:
public OnPlayerSpawn(playerid)
{
        if(EndRoundCounter != 0)
        {

            SendClientMessage(playerid, COLOR_RED,"Sorry, you can't join while the round is in progress, you have to wait ...");
            SendClientMessage(playerid, COLOR_ORANGE,"While you have to wait, you can specate the ADMIN !");
            GameTextForPlayer(playerid, "~y~Round in progress ...", 1250, 3);
            TogglePlayerSpectating(playerid, 1);
            PlayerSpectateVehicle(playerid, GetPlayerVehicleID(playerid), SPECTATE_MODE_NORMAL);//THIS

        }
        else
        {
           for(new i; i<MAX_PLAYERS; i++)
           {
                SendClientMessage(playerid, COLOR_WHITE,"You are a derby member ! You play the derby and fight against other cars/players !");
                SendClientMessage(playerid, COLOR_ORANGE,"You were put randomly in a vehicle ...");
                SendClientMessage(playerid, COLOR_WHITE,"Take a look to /derbycmds and if you want to start : wait for the countdown !");
              new rand1=random(30);
              if(!IsPlayerInVehicle(i, CarMap1[rand1])) return PutPlayerInVehicle(playerid, CarMap1[rand1], 0);
               
           }
        }
return 1;
}
Plz help me !?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)