[Ajuda] Getar score e money - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Getar score e money (
/showthread.php?tid=358274)
Getar score e money -
Don_Speed - 10.07.2012
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
Re: Getar score e money -
Jason` - 10.07.2012
pawn Код:
PlayerInfo[i][pGrana] = GetPlayerMoney(i);
PlayerInfo[i][pScore] = GetPlayerScore(i);
Re: Getar score e money -
@Riichard - 10.07.2012
@Edit
Pedro speed -q
Re: Getar score e money -
Don_Speed - 10.07.2012
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
Re: Getar score e money -
Victor' - 10.07.2012
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;
}
Re: Getar score e money -
Jason` - 10.07.2012
Faзa como o Victor disse, cometi um erro, o cуdigo foi editado...
Re: Getar score e money -
Don_Speed - 10.07.2012
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.
Re: Getar score e money -
Victor' - 10.07.2012
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;
}
Re: Getar score e money -
Abravanel - 10.07.2012
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.
Re: Getar score e money -
Don_Speed - 10.07.2012
nao consegui ainda