Sillence
Wiek: 26 Na forum: 5157 dni Posty: 1514
Nick w MP: Sillence
Piwa : 1517
Witajcie mam taki kod fotoradaru:
Kod: new sex;
if(strcmp(cmd, "/fotoradar_on", true) == 0)
{
TextDrawShowForPlayer(playerid,Fotoradar[1]);
TextDrawShowForPlayer(playerid,Fotoradar[2]);
TextDrawShowForPlayer(playerid,Fotoradar1[playerid]);
sex = SetTimerEx("FotoradarPolicja",100,true,"d",playerid);
return 1;
}
if(strcmp(cmd, "/fotoradar_off", true) == 0)
{
KillTimer(sex);
TextDrawHideForPlayer(playerid,Fotoradar[1]);
TextDrawHideForPlayer(playerid,Fotoradar[2]);
TextDrawHideForPlayer(playerid,Fotoradar1[playerid]);
return 1;
}
forward FotoradarPolicja(playerid);
public FotoradarPolicja(playerid)
{
for(new i=0,p=GetMaxPlayers(); i<p; i++)
{
if(GetDistanceBetweenPlayers(playerid,i)<80)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
if(i != playerid)
{
new string[256];
format(string,sizeof string,"Kierowca: %s~n~Jedzie: %d km/h",PlayerName(i),GetPlayerSpeed(i));
TextDrawSetString(Fotoradar1[i],string);
}
}
}
}
return 1;
}
I jest taki problem ?e on nie dzia?a pisze:
"Kierowca %s
Jedzie %d km/h"
chocia? przy mnie gracze je?d??