Adding somthing to code
#1

Hi, I would like to add to this code (which is part of my speedradar for police) a feature that also detects the vehicle model (like Admiral). How would I do this?

Here is the code I have now (which just gets the speed and sends it to the Officer):

pawn Код:
public CheckS(playerid)
{
    new id = s_GetClosestPlayer(playerid,10.0),estr[128];
    if(!IsPlayerConnected(id) || s_IsCop(id) || !active[playerid] || fi[playerid][id] || GetPlayerState(id) != 2 ||!GetSpeed(id)) return SetTimerEx("CheckS",500,0,"i",playerid),1;
    format(estr,128,"%s drives at %d KMH.",GET_PLAYER_NAME(id),GetSpeed(id));
    fi[playerid][id] = true;
    SendClientMessage(playerid,0xAA3333AA,estr);
    SetTimerEx("Unfi",7*1000,0,"ii",playerid,id);
    SetTimerEx("CheckS",500,0,"i",playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)