Script problem
#1

Here it is.After i fixed my command /hfind,everything is cool.It tracks player but afte rhe dies,checkpoint is being removed but i still see the seconds counting on my screen and they never stop.And if i try to use it again it says i cannot use it now.

pawn Code:
if(FindTime[playerid] <= 1)
{
    ShowPlayerMarkers(0);
    FindTime[playerid] = 0;
}
I added this but it gives invalid function or declaration.Helpme please.
Reply
#2

Bump
Reply
#3

pawn Code:
if(FindTime[playerid] >= 1)
{
    ShowPlayerMarkers(0);
    FindTime[playerid] = 0;
}
maybe that works? you said if FindTime[playerid] smaller or equal than 1

but in this one i made if FindTime[playerid] more or equal than 1

Hope this works
Reply
#4

pawn Code:
OnPlayerDeath(playerid, bla bla bla){
if(FindTime[playerid] !=0)
{
        ShowPlayerMarkers(0);
    FindTime[playerid] = 0;
}
//...
I think this should work. After he dies it will remove all markers.

And in the timer which sets remaining time post this code:
pawn Code:
new bool:flag=false;
for(new i=0;i<MAX_PLAYERS;i++)
{
    if(!IsPlayerConnected(i))continue;
    if(FindTime[i] !=0){
    flag=true;
    break;
    }
   if(flag==false)ShowPlayerMarkers(0);
}
This should remove markers after time expires.
Reply
#5

it removes the market.But i cant useit again and it continues to count.I need it to count till i kill him.After it stops tracking.
Reply
#6

can you check when the counter becomes 0, then kill the timer and hide textdraw or however is counter shown to player(s)
Reply
#7

pawn Code:
CMD:hfind(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] != 8)
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You're not a Hitman.");
        return 1;
    }
    new string[128], giveplayerid;
    if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /hfind [playerid]");

    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "You can't use this command on yourself."); return 1; }
        if(GetPlayerInterior(giveplayerid)!=0) { SendClientMessageEx(playerid, COLOR_GREY, "That person is inside an interior."); return 1; }
        if(PlayerInfo[giveplayerid][pAdmin] >= 2 && PlayerInfo[giveplayerid][pAdminDuty] == 1) { SendClientMessageEx(playerid, COLOR_GREY, "You are unable to find this person."); return 1; }
        SetPlayerMarkerForPlayer(playerid, giveplayerid, FIND_COLOR);
        new zone[MAX_ZONE_NAME];
        GetPlayer3DZone(giveplayerid, zone, sizeof(zone));
        format(string, sizeof(string), "%s has been last seen at %s.", GetPlayerNameEx(giveplayerid), zone);
        SendClientMessageEx(playerid, COLOR_GRAD2, string);
        FindingPlayer[playerid]=giveplayerid;
        FindTime[playerid] = 3;
        SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
    }
    return 1;
}
That's the command.Make it to track atleast 30 seconds please.I am really having problems with this command.Like after 30 seconds everything expires on tracking.Like /find on detective job.If you make it i guarrantee i will rep you.This command took my mind :X
Reply
#8

bump
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)