why i dont get cookies on spree?
#1

Код:
    SendDeathMessage(playerid, killerid, reason);
    KillingSpree[playerid] = 0;
    KillingSpree[killerid]++;
    if(KillingSpree[killerid] == 50)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 50) (Reward : $60000 + %d Cookies)",KillerName, 100);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 100;
     }

    if(KillingSpree[killerid] == 35)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 35) (Reward : $25000 + %d Cookies)",KillerName, 50);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 50;
     }

    if(KillingSpree[killerid] == 20)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 20) (Reward : $25000 + %d Cookies)",KillerName, 35);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 35;
     }

    if(KillingSpree[killerid] == 15)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 15) (Reward : $15000 + %d cookies)",KillerName, 25);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 25;
     }

    if(KillingSpree[killerid] == 10)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 10) (Reward : $10000 + %d cookies)",KillerName, 15);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 15;
     }

    if(KillingSpree[killerid] == 5)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 5) (Reward : $5000 + %d cookies)",KillerName, 10);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 10;
     }

    if(KillingSpree[killerid] == 3)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 3) (Reward : $1500 + %d cookies)",KillerName, 5);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[playerid][Cookies] += 5;
     }
Reply
#2

PlayerInfo[playerid][Cookies] += 5;
You're giving cookies to the player dying.
Change:

PHP код:
PlayerInfo[playerid][Cookies
To:
PHP код:
PlayerInfo[killerid][Cookies
Reply
#3

Код:
    SendDeathMessage(playerid, killerid, reason);
    KillingSpree[playerid] = 0;
    KillingSpree[killerid]++;
    if(KillingSpree[killerid] == 50)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 50) (Reward : $60000 + %d Cookies)",KillerName, 100);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 100;
     }

    if(KillingSpree[killerid] == 35)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 35) (Reward : $25000 + %d Cookies)",KillerName, 50);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 50;
     }

    if(KillingSpree[killerid] == 20)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 20) (Reward : $25000 + %d Cookies)",KillerName, 35);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 35;
     }

    if(KillingSpree[killerid] == 15)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 15) (Reward : $15000 + %d cookies)",KillerName, 25);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 25;
     }

    if(KillingSpree[killerid] == 10)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 10) (Reward : $10000 + %d cookies)",KillerName, 15);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 15;
     }

    if(KillingSpree[killerid] == 5)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 5) (Reward : $5000 + %d cookies)",KillerName, 10);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 10;
     }

    if(KillingSpree[killerid] == 3)
     {
      new KillerName[MAX_PLAYER_NAME]; GetPlayerName(killerid,KillerName,MAX_PLAYER_NAME);
      new string[128]; format(string,sizeof(string),"%s is on a killing spree! (Kills : 3) (Reward : $1500 + %d cookies)",KillerName, 5);
      SendClientMessageToAll(COLOR_CYAN, string);
      PlayerInfo[killerid][Cookies] += 5;
     }
worked now,thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)