[Ajuda] Getar score e money
#1

pawn Код:
SetTimer("Utilitarios", 1000, true);//gamemodeinit
forward Utilitarios();
public Utilitarios()
{
   for(new i, f = GetMaxPlayers(); i < f; i++)
   {
      if(IsPlayerConnected(i))
      {
           if(IsPlayerInAnyVehicle(i))
           {
              RepairVehicle(GetPlayerVehicleID(i));
              AddVehicleComponent(GetPlayerVehicleID(i) ,1010);
              GetPlayerMoney(PlayerInfo[i][pGrana]);
              GetPlayerScore(PlayerInfo[i][pScore]);
           }
      }
   }
   return true;
}

Nao Geta! Malz galera fiquei uma semana sem codar e parece que esqueci tudo kkkkkkk
Reply
#2

pawn Код:
PlayerInfo[i][pGrana] = GetPlayerMoney(i);
PlayerInfo[i][pScore] = GetPlayerScore(i);
Reply
#3

@Edit
Pedro speed -q
Reply
#4

Quote:
Originally Posted by Pedro_Miranda
Посмотреть сообщение
pawn Код:
PlayerInfo[i][pGrana] = GetPlayerMoney(playerid);
PlayerInfo[i][pScore] = GetPlayerScore(playerid);
erro playerid , botei um i e nao getou
Reply
#5

Tente assim:
pawn Код:
SetTimer("Utilitarios", 1000, true);//gamemodeinit
forward Utilitarios();
public Utilitarios()
{
   for(new i, f = GetMaxPlayers(); i < f; i++)
   {
      if(IsPlayerConnected(i))
      {
        if(IsPlayerInAnyVehicle(i))
        {
            RepairVehicle(GetPlayerVehicleID(i));
            AddVehicleComponent(GetPlayerVehicleID(i) ,1010);
        }
        PlayerInfo[i][pGrana] = GetPlayerMoney(i);
        PlayerInfo[i][pScore] = GetPlayerScore(i);
      }
   }
   return true;
}
Reply
#6

Faзa como o Victor disse, cometi um erro, o cуdigo foi editado...
Reply
#7

Quote:
Originally Posted by Victor'
Посмотреть сообщение
Tente assim:
pawn Код:
SetTimer("Utilitarios", 1000, true);//gamemodeinit
forward Utilitarios();
public Utilitarios()
{
   for(new i, f = GetMaxPlayers(); i < f; i++)
   {
      if(IsPlayerConnected(i))
      {
        if(IsPlayerInAnyVehicle(i))
        {
            RepairVehicle(GetPlayerVehicleID(i));
            AddVehicleComponent(GetPlayerVehicleID(i) ,1010);
        }
        PlayerInfo[i][pGrana] = GetPlayerMoney(i);
        PlayerInfo[i][pScore] = GetPlayerScore(i);
      }
   }
   return true;
}
pawn Код:
C:\Documents and Settings\don\Desktop\DonServer\gamemodes\NovoDrift.pwn(625) : error 017: undefined symbol "playerid"
C:\Documents and Settings\don\Desktop\DonServer\gamemodes\NovoDrift.pwn(626) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

pawn Код:
SetTimer("Utilitarios", 1000, true);//gamemodeinit
forward Utilitarios();
public Utilitarios()
{
   for(new i, f = GetMaxPlayers(); i < f; i++)
   {
      if(IsPlayerConnected(i))
      {
        if(IsPlayerInAnyVehicle(i))
        {
            RepairVehicle(GetPlayerVehicleID(i));
            AddVehicleComponent(GetPlayerVehicleID(i) ,1010);
        }
        new tmpm[f], tmpsc[f];
       
        GetPlayerMoney(i, tmpm[i]);
        GetPlayerScore(i, tmpsc[i]);
       
        PlayerInfo[i][pGrana] = tmpm[i];
        PlayerInfo[i][pScore] = tmpsc[i];
        return 1;
      }
   }
   return 0;
}
Reply
#9

Quote:
Originally Posted by Victor'
Посмотреть сообщение
pawn Код:
SetTimer("Utilitarios", 1000, true);//gamemodeinit
forward Utilitarios();
public Utilitarios()
{
   for(new i, f = GetMaxPlayers(); i < f; i++)
   {
      if(IsPlayerConnected(i))
      {
        if(IsPlayerInAnyVehicle(i))
        {
            RepairVehicle(GetPlayerVehicleID(i));
            AddVehicleComponent(GetPlayerVehicleID(i) ,1010);
        }
        new tmpm[f], tmpsc[f];
       
        GetPlayerMoney(i, tmpm[i]);
        GetPlayerScore(i, tmpsc[i]);
       
        PlayerInfo[i][pGrana] = tmpm[i];
        PlayerInfo[i][pScore] = tmpsc[i];
        return 1;
      }
   }
   return 0;
}
GetPlayerMoney e GetPlayerScore nгo dгo suporte para 2 parвmetros.

-Tуpico:

Testei no lvdm e compilo.
Reply
#10

nao consegui ainda
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)