SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 07/08/2010, 12:38 AM   #21
Link_
Gangsta
 
Link_'s Avatar
 
Join Date: Jul 2010
Location: João Monlevade
Posts: 553
Reputation: 3
Default Re: [TUT] Criando Gangs (/gang criar)

isso e mais facil e n e complicado xD
__________________

Novo Projeto vem por ae

Brasil Mata-Mata 2012 [ SaW ]



Link_ is offline   Reply With Quote
Old 07/08/2010, 01:44 PM   #22
leandro123456
Huge Clucker
 
leandro123456's Avatar
 
Join Date: Mar 2010
Location: Brasil
Posts: 364
Reputation: 3
Default Re: [TUT] Criando Gangs (/gang criar)

Eu fiz todo o tuto e deu 8 erros
pawn Code:
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(64) : error 017: undefined symbol "dini_Exists"
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(66) : error 017: undefined symbol "dini_Create"
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(67) : error 017: undefined symbol "dini_IntSet"
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(69) : warning 217: loose indentation
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(125) : error 017: undefined symbol "SendMessageToGang"
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(130) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(141) : error 017: undefined symbol "PlayerInGang"
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(141) : warning 215: expression has no effect
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(141) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(141) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Leandro novo\Desktop\Server novo\filterscripts\sgang.pwn(141) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.

Esse e todo o fs, depois de ter feito todo o tutorial.
pawn Code:
#include <a_samp>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT
#define MAX_GANGS 32
#define MAX_GANG_PLAYERS 16
#define SEM_GANG 0
new gangInvite[MAX_PLAYERS];
new PlayerInGang[MAX_PLAYERS];
new gangMembers[MAX_GANGS][MAX_GANG_PLAYERS];//Array para Enviar Mensagem posteriormente
new file[64];
format(file, sizeof(file), "%d.ini", GetPlayerTeam(playerid));// Salva Arquivo com ID_DA_GANG.ini
dini_Create(file);
dini_Set(file,"Nome",tmp);//Salvara Nome da Gang
stock ler_nome(gangid)
{
    new arquivo[128];
    format(arquivo,sizeof(arquivo),"%i.ini",gangid);
    format(arquivo,sizeof(arquivo),dini_Get(arquivo,"Nome"));
    return arquivo;
}

stock SendMessageToGang(playerid,color,const msg[])
{
   for (new i=0; i<MAX_GANG_PLAYERS; i++)//Pega os Membros da Gang
   {
   if (IsPlayerConnected(i) && PlayerInGang[playerid] > 0)//se tiver conectado e for de um gang
   {
   SendClientMessage(gangMembers[GetPlayerTeam(playerid)][i],color,msg);//Envia MSG para os mesmos da gang
   }
   }
   return 1;
}

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
if(!dini_Exists(Archivo))
{
dini_Create(Archivo);
dini_IntSet(Archivo, "GangsCreates", 0);
}
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if(text[0] == '!') {//Se Tiver '!'
    new string[128]; GetPlayerName(playerid,string,sizeof(string));//Geta Nome
    format(string,sizeof(string),"Gang Chat: %s: %s",string,text[1]);//Formato da Mensagem
    SendMessageToGang(playerid,0xFFFFFFFF,string);//Envia Mensagem
    }
    return 0;
}

public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = comandos(cmdtext, idx);
if(strcmp(cmd, "/gangentrar", true) == 0)
  {
if(PlayerInGang[playerid]==0 && gangInvite[playerid] != 0) //Se o Convite for Diferente de '0' que seria a gang padrao  e  ele estiver fora da gang
{
SetPlayerTeam(playerid,gangInvite[playerid]); // coloca na gang como definido anteriormente
SendClientMessage(playerid, 0xFFFFFFFF, "você foi entrou na gang");
PlayerInGang[playerid] = GetPlayerTeam(playerid);
gangInvite[playerid] = 0;//Reseta o Convite
}
    return 1;
}
)//
if(strcmp(cmd, "/gangconvite", true) == 0)
    {
    new tmp[128];
    tmp = comandos(cmdtext, idx);
    if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /gangconvite[ID]");
    SendClientMessage(playerid, 0xFFFFFFFF, "você foi convidado a entrar em uma gang");
    gangInvite[strval(tmp)] == PlayerInGang[playerid];//Habilita Convite para o ID da Gang
    return 1;
    }
    )//
if(strcmp(cmd, "/gangcriar", true) == 0)
    {
    new tmp[128];
        tmp = comandos(cmdtext, idx);
    if(PlayerInGang[playerid]>0)//Se o player estive em uma gang
    {
    return SendClientMessage(playerid, 0xFF8040FF, " Já estás em uma gang");;
    }
        new i;//define id da gang
    i= dini_Int("Gang.ini", "GangsCreates")+1;//define id da gang
    new string[128];
    format(string, sizeof(string),"Você criou a gang: '%s' (%d)", tmp, i);//Irá Enviar MSG que a gang foi criada com ID
    SendClientMessage(playerid, 0xFF8040FF, string);//Envia MSG
    PlayerInGang[playerid]=i;//Irá Colocar o Player na Gang
    SetPlayerTeam(playerid,PlayerInGang[playerid]);//Seta o Player a Uma Gang a Ativa Anti TK
    return 1;
    }


    return 0;
}

public OnPlayerInfoChange(playerid)
{
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}
public ler_nome(GetPlayerTeam(playerid));//Lê o nome da gang em arquivo

comandos(const string[], &index)//essa é a strtok modificada para não dar complicados com outras
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}

Se puderem me ajudar ficarei grato.
leandro123456 is offline   Reply With Quote
Old 07/01/2011, 04:48 PM   #23
rene20
Huge Clucker
 
Join Date: Sep 2010
Posts: 313
Reputation: 0
Default Re: [TUT] Criando Gangs (/gang criar)

To começando gm do inicio ajuda ae
Quote:
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(337) : error 017: undefined symbol "comandos"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(337) : error 033: array must be indexed (variable "cmd")
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(340) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(342) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(343) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(344) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(345) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(347) : error 079: inconsistent return types (array & non-array)
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(352) : error 017: undefined symbol "comandos"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(352) : error 033: array must be indexed (variable "tmp")
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(353) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(353) : error 079: inconsistent return types (array & non-array)
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(354) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(355) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(356) : error 079: inconsistent return types (array & non-array)
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(361) : error 017: undefined symbol "comandos"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(361) : error 033: array must be indexed (variable "tmp")
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(362) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(364) : error 017: undefined symbol "playerid"
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(364) : error 079: inconsistent return types (array & non-array)
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(364) : warning 225: unreachable code
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(364) : error 036: empty statement
C:\Users\Wilson\Desktop\Server GTA\gamemodes\grandlarc.pwn(364) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


22 Errors.
__________________
rene20 is offline   Reply With Quote
Old 06/02/2011, 07:46 PM   #24
Link_
Gangsta
 
Link_'s Avatar
 
Join Date: Jul 2010
Location: João Monlevade
Posts: 553
Reputation: 3
Default Re: [TUT] Criando Gangs (/gang criar)

Drakins da erro af igual do lenadro arruma ae fazendo favor
__________________

Novo Projeto vem por ae

Brasil Mata-Mata 2012 [ SaW ]



Link_ is offline   Reply With Quote
Old 06/02/2011, 07:50 PM   #25
Macintosh
High-roller
 
Macintosh's Avatar
 
Join Date: Aug 2010
Location: Somewhere Far *User Type: Administrator
Posts: 3,647
Reputation: 111
Default Re: [TUT] Criando Gangs (/gang criar)

Tente atualizar a dini pra 0.3c
__________________

"É tão estranho
Os bons morrem jovens
Assim parece ser, quando me lembro de você
Que acabou indo embora, cedo demais
"

Os bons morrem jovens (Legião Urbana).

Um dia a gente irá se encontrar numa bem melhor brother

Macintosh is offline   Reply With Quote
Old 06/02/2011, 07:56 PM   #26
Link_
Gangsta
 
Link_'s Avatar
 
Join Date: Jul 2010
Location: João Monlevade
Posts: 553
Reputation: 3
Default Re: [TUT] Criando Gangs (/gang criar)

e a 3.0c mesmo que to usando
__________________

Novo Projeto vem por ae

Brasil Mata-Mata 2012 [ SaW ]



Link_ is offline   Reply With Quote
Old 06/02/2011, 07:58 PM   #27
Macintosh
High-roller
 
Macintosh's Avatar
 
Join Date: Aug 2010
Location: Somewhere Far *User Type: Administrator
Posts: 3,647
Reputation: 111
Default Re: [TUT] Criando Gangs (/gang criar)

Atualize a include ~.~'
__________________

"É tão estranho
Os bons morrem jovens
Assim parece ser, quando me lembro de você
Que acabou indo embora, cedo demais
"

Os bons morrem jovens (Legião Urbana).

Um dia a gente irá se encontrar numa bem melhor brother

Macintosh is offline   Reply With Quote
Old 06/02/2011, 08:27 PM   #28
Link_
Gangsta
 
Link_'s Avatar
 
Join Date: Jul 2010
Location: João Monlevade
Posts: 553
Reputation: 3
Default Re: [TUT] Criando Gangs (/gang criar)

man dexa ´-´
__________________

Novo Projeto vem por ae

Brasil Mata-Mata 2012 [ SaW ]



Link_ is offline   Reply With Quote
Old 20/02/2011, 10:18 PM   #29
play_here
Little Clucker
 
Join Date: Feb 2011
Posts: 1
Reputation: 0
Default Re: [TUT] Criando Gangs (/gang criar)

Quote:
Agora vamos ao comando em OnPlayerCommandTex:
GangEntrar:
Tudo para baixo é OnPlayerCommandText ? Pode explicar onde por esse resto?
play_here is offline   Reply With Quote
Old 21/02/2011, 12:11 AM   #30
[RoxX]Ygor
Huge Clucker
 
[RoxX]Ygor's Avatar
 
Join Date: Aug 2010
Posts: 223
Reputation: 2
Default Re: [TUT] Criando Gangs (/gang criar)

Parabêns ótimo sistema de Gang vou usar no meu RPG rs.
__________________
Brasil - Project Virtual [RPG] ®
IP: 108.61.77.229:7777

+ Fórum | Blog Oficial

Quote:
- Pawn Script -
[RoxX]Ygor is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:53 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.