Error in script?
#1

I set my killstreak to give a Death machine on 11 Kills. But it keeps giving it to me in 6 kills. But nowhere in my script does it say to give it in 6 kills.

Код:
CMD:deathmachine(playerid,params[])
{
    if(GetPVarInt(playerid,"KillStreak") >= 11)
    {
        GivePlayerWeapon(playerid,38,250);
        SetPVarInt(playerid,"KillStreak",0);
        return 1;
    }
    if(GetPVarInt(playerid,"KillStreak") <= 10)
    {
    GameTextForPlayer(playerid,"~r~You Don't have a Death Machine",5000,3);
}
    return 1;
}
Reply
#2

Eh, I can't understand you.
Reply
#3

PHP код:
CMD:deathmachine(playerid,params[])
{
    if(
GetPVarInt(playerid,"KillStreak") >= 11)
    {
        
GivePlayerWeapon(playerid,38,250);
        
SetPVarInt(playerid,"KillStreak",0);
        
//return 1;
    
}
    else
    if(
GetPVarInt(playerid,"KillStreak") <= 10)
    {
    
GameTextForPlayer(playerid,"~r~You Don't have a Death Machine",5000,3);
    }
    return 
1;

and after onplayerdeath (if you need this)
PHP код:
SetPVarInt(playerid"KillStreak"0); 
try this
Reply
#4

Quote:
Originally Posted by LZLo
Посмотреть сообщение
PHP код:
CMD:deathmachine(playerid,params[])
{
    if(
GetPVarInt(playerid,"KillStreak") >= 11)
    {
        
GivePlayerWeapon(playerid,38,250);
        
SetPVarInt(playerid,"KillStreak",0);
        
//return 1;
    
}
    else
    if(
GetPVarInt(playerid,"KillStreak") <= 10)
    {
    
GameTextForPlayer(playerid,"~r~You Don't have a Death Machine",5000,3);
    }
    return 
1;

and after onplayerdeath (if you need this)
PHP код:
SetPVarInt(playerid"KillStreak"0); 
try this
Thanks. it works like a charm now .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)