public KillStreak
#1

I'm making this:

Код:
public KillStreak(playerid)
(
   if((GetPlayerScore(playerid) >= 15)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 15 score! 2000$ for you!");
    GivePlayerMoney(playerid, 2000);
   )
   if((GetPlayerScore(playerid) >= 30)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 30 score! 4000$ for you!");
    GivePlayerMoney(playerid, 4000);
    return 1;
)
I've already added:

forward KillStreak(playerid);

But i got this:

Код:
C:\Documents and Settings\k\Desktop\SFWAR.pwn(2316 -- 2317) : error 029: invalid expression, assumed zero
C:\Documents and Settings\k\Desktop\SFWAR.pwn(2322) : error 010: invalid function or declaration
C:\Documents and Settings\k\Desktop\SFWAR.pwn(2326) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#2

pawn Код:
public KillStreak(playerid)
{
   if((GetPlayerScore(playerid) >= 15)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 15 score! 2000$ for you!");
    GivePlayerMoney(playeridid, 2000);
   }
   if((GetPlayerScore(playerid) >= 30)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 30 score! 4000$ for you!");
    GivePlayerMoney(playeridid, 4000);
   }
 return 1;
}
Reply
#3

Код:
C:\Documents and Settings\k\Desktop\SFWAR.pwn(2318) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerScore"
C:\Documents and Settings\k\Desktop\SFWAR.pwn(2322) : error 010: invalid function or declaration
C:\Documents and Settings\k\Desktop\SFWAR.pwn(2327) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#4

pawn Код:
public KillStreak(playerid)
{
   if(GetPlayerScore(playerid) >= 15)
   {
       SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 15 score! 2000$ for you!");
       GivePlayerMoney(playeridid, 2000);
   }
   if(GetPlayerScore(playerid) >= 30)
   {
       SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 30 score! 4000$ for you!");
        GivePlayerMoney(playeridid, 4000);
   }
 return 1;
}
Reply
#5

pawn Код:
public KillStreak(playerid)
{
    if(GetPlayerScore(playerid) >= 15)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 15 score! 2000$ for you!");
        GivePlayerMoney(playerid, 2000);
    }
    if(GetPlayerScore(playerid) >= 30)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 30 score! 4000$ for you!");
        GivePlayerMoney(playerid, 4000);
    }
    return 1;
}
I'm pretty sure this will work.
Reply
#6

Quote:
Originally Posted by Freddi-25
Посмотреть сообщение
pawn Код:
public KillStreak(playerid)
{
    if(GetPlayerScore(playerid) >= 15)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 15 score! 2000$ for you!");
        GivePlayerMoney(playerid, 2000);
    }
    if(GetPlayerScore(playerid) >= 30)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"You have now reached 30 score! 4000$ for you!");
        GivePlayerMoney(playerid, 4000);
    }
    return 1;
}
I'm pretty sure this will work.
Copy paste much ?

I edited Stevens code if you can read.
Reply
#7

if(GetPlayerScore(playerid) >= 15) this will spam

if(GetPlayerScore(playerid) >= 15 && PlayerInfo[playerid][pKillstreak][0] == 0)

say the timer is set to 3 seconds and u kill 2 ppl in 2 seconds, there health was 1-10 or something, you wont unlock it. you must make a var with it unless the timer is fast
Reply
#8

Quote:
Originally Posted by leeroy1337
Посмотреть сообщение
Copy paste much ?

I edited Stevens code if you can read.
Find the errors in your code.
Reply
#9

Ok.Thanks all.
Reply
#10

If there's something I hate, it are the double ((... Only use it on the calculate-rules.. :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)