#1

Solved
Reply
#2

pawn Код:
CMD:uav(playerid, params[])
{
    if (Kills[playerid] > 2)
    {
        ShowPlayerMarkers(2);
        SetTimer("UAVGONE",9000,false); // 9 second
        return 1;
    }
    else return 0; // or error message
}
Reply
#3

And of course end the killstreak of the killed player:

SetPVarInt(playerid, "Kills", 0);
Reply
#4

Increase the PVAR kills by one for killerid everytime he kills somebody, then check if he has X amount of kills when he types /uav.

You're better off using the normal array method than pvars for things like that though, because pvars are just slower, and are only usefull for sharing across scripts, I also found you can't save pvars under OnPlayerDisconnect, or that might have been a mistake on my side.

To make a PVAR go up (example for killerid, put under OnPlayerDeath)

pawn Код:
SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills") + 1);
And to check what his kills are:

pawn Код:
if(GetPVarInt(playerid, "Kills") >= 3) // More or equals to 3 kills
As I said, you could just use the normal array method.

pawn Код:
pData[killerid][Kills]++;
pawn Код:
if(pData[playerid][Kills] >= 3)
Reply
#5

nice. u think i can make other killstreaks? like airstrike, nuke, or something
btw do i put this in a Filterscript?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)