03.04.2012, 13:05
Hy guys, can someone help me with this command , i use strcmp .. and i tried to make it to strcmp but i failed ..
pawn Код:
CMD:radar(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
format(string, sizeof(string), "* %s takes out a speed radar and shoots it out.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SendClientMessage(playerid, COLOR_GREEN, "Nearest vehicles speed:");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && i!=playerid)
{
if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
if (ProxDetectorS(30.0, playerid, i) && Speed[i] > 15)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
giveplayer[strfind(giveplayer,"_")] = ' ';
format(string, sizeof(string), "Vehicle:%s Name:%s speed ~%dkm/h", VehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400],giveplayer,Speed[i]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* You are not a cop!");
return 1;
}
return 1;
}
return 1;
}