SA-MP Forums Archive
/speedradar Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /speedradar Help! (/showthread.php?tid=175384)



/speedradar Help! - nielsbon1 - 09.09.2010

I'm bussy with /speedradar for my cops but it dont work in game.
Can someone help me?

Functions:
new SpeedRadar[MAX_PLAYERS];
new PlayerText3D: SpeedText[MAX_PLAYERS];

Script:

if(strcmp(cmd, "/speedradar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pRank] >= 3)
{
new x_job[256];
x_job = mystrtok(cmdtext, idx);
if(!strlen(x_job))
{
SendClientMessage(playerid,COLOR_GREY,".: Usage: /speedradar [On/Off] :.");
return 1;
}
if(strcmp(x_job,"on",true) == 0)
{
for(new v = 0; v <= MAX_PLAYERS; v++)
{
SpeedRadar[playerid] = 1;
new tmpcar = GetPlayerVehicleID(v);
new Float: vX, Float: vY, Float: vZ;
GetVehiclePos(tmpcar,vX,vY,vZ);
DeletePlayer3DTextLabel(playerid,SpeedText[playerid]);
format(string,sizeof(string),"Speed:\n %d",GetSpeed(v));
SpeedText[playerid] = CreatePlayer3DTextLabel(playerid, string, COLOR_RED, vX, vY, vZ, 30.0, INVALID_PLAYER_ID, tmpcar, 0);
}
}
else if(strcmp(x_job,"off",true) == 0)
{
DeletePlayer3DTextLabel(playerid,SpeedText[playerid]);
return 1;
}
}
}
return 1;
}


Re: /speedradar Help! - [Lsrcr]Rafa - 09.09.2010

where u need to put this can u tell me o_0


Re: /speedradar Help! - nielsbon1 - 09.09.2010

Huh i need to put it in my roleplay gamemode script.