Where to place this?
#2

Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid=GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
       SetVehicleParamsEx(vehicleid,0,0,0,0,0,0,0);
       SendClientMessage(playerid,COLOR_PURPLE,"Press 2 to toggle engine");
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
      if(IsPlayerInRangeOfPoint(playerid,20.0,-2013.1947,-61.9978,35.3203))
      {
         GetPlayerSpeed(playerid,true);
         new string[128];
         new pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid,pName,sizeof(pName));
         format(string,sizeof(string),"RadarInfo:%s(%d)-speed = %d",pName,playerid,GetPlayerSpeed(playerid,true));
         SendClientMessageToAll(COLOR_BLUE,string);
    }
    return 1;
}
you must i think :
Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid=GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
       SetVehicleParamsEx(vehicleid,0,0,0,0,0,0,0);
       SendClientMessage(playerid,COLOR_PURPLE,"Press 2 to toggle engine");
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
      if(IsPlayerInRangeOfPoint(playerid,20.0,-2013.1947,-61.9978,35.3203))
      {
         new string[128];
         new pName[MAX_PLAYER_NAME];
         GetPlayerName(playerid,pName,sizeof(pName));
         format(string,sizeof(string),"RadarInfo:%s(%d)-speed = %d",pName,playerid,GetPlayerSpeed(playerid,true),GetPlayerSpeed(playerid,false));
         SendClientMessageToAll(COLOR_BLUE,string);
      }
    }
    return 1;
}
Reply


Messages In This Thread
Where to place this? - by Cjgogo - 13.06.2011, 15:31
Re: Where to place this? - by Skaizo - 13.06.2011, 15:32
Re: Where to place this? - by Iphone1234g - 13.06.2011, 15:42
Re: Where to place this? - by Cjgogo - 13.06.2011, 15:49
Re: Where to place this? - by xalith - 13.06.2011, 15:58
Re: Where to place this? - by Cjgogo - 13.06.2011, 16:06
Re: Where to place this? - by xalith - 13.06.2011, 17:02
Re: Where to place this? - by ricardo178 - 13.06.2011, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)