[Ajuda] [AJUDA] Sistema God Mode - Erros
#1

Olб queria que alguem pudeзe arrumar esse sistema que eu fiz Pra Ligar e Desligar o God Mode. mais ta com erro. valeu

Quote:
//#define FILTERSCRIPT

#include <a_samp>
new bool:GodMode[MAX_PLAYERS];
new Float:hpantes;
forward GodModeFunc();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Imortalidade para Hidan");
print("--------------------------------------\n");
SetTimer("GodModeFunc",1000,1);
return 1;
}
public OnPlayerConnect(playerid)
{
GodMode[playerid] = false;
}
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print(" Fim do sistema Imortal");
print("--------------------------------------\n");
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hidanimortalmode", cmdtext, true, 10) == 0)
{
if(GodMode[playerid] == false)
{
GetPlayerHealth(playerid,hpantes);
SetPlayerHealth(playerid,9999999);
GodMode[playerid] = true;
SendClientMessage(playerid,-1,"IMORTALIDADE {21DD00}LIGADO");
}
else
{
SetPlayerHealth(playerid,hpantes);
GodMode[playerid] = false;
SendClientMessage(playerid,-1,"IMORTALIDADE{E60000}DESLIGADO");
}
return 0;
}
public GodModeFunc()
{
for(new i;i < MAX_PLAYERS; i++)
{
else if(GodMode[i] == true)
{
SetPlayerHealth(i,9999999);
}
}
return 1;
}

Erros:

C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(46) : warning 217: loose indentation
C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(46) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(46) : error 004: function "GodModeFunc" is not implemented
C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(50) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(50) : warning 215: expression has no effect
C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(50) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Daniel\Desktop\samp03x_svr_R1-2_win32\filterscripts\HidanGodMode.pwn(57) : error 030: compound statement not closed at the end of file (started at line 29)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#2

Meu Deus, usa a tag [ pawn]
Reply
#3

Tente
pawn Код:
//#define FILTERSCRIPT

#include <a_samp>
new bool:GodMode[MAX_PLAYERS];
new Float:hpantes;
forward GodModeFunc();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Imortalidade para Hidan");
print("--------------------------------------\n");
SetTimer("GodModeFunc",1000,1);
return 1;
}
public OnPlayerConnect(playerid)
{
GodMode[playerid] = false;
}
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print(" Fim do sistema Imortal");
print("--------------------------------------\n");
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hidanimortalmode", cmdtext, true, 10) == 0)
{
if(GodMode[playerid] == false)
{
GetPlayerHealth(playerid,hpantes);
SetPlayerHealth(playerid,9999999);
GodMode[playerid] = true;
SendClientMessage(playerid,-1,"IMORTALIDADE {21DD00}LIGADO");
}
else
{
SetPlayerHealth(playerid,hpantes);
GodMode[playerid] = false;
SendClientMessage(playerid,-1,"IMORTALIDADE{E60000}DESLIGADO");
}
return 0;
}

for(new i;i < MAX_PLAYERS; i++)
{
if(GodMode[i] == true)
{
SetPlayerHealth(i,9999999);
}
}
return 1;
}
Reply
#4

pawn Код:
#include <a_samp>

new bool:GodMode[MAX_PLAYERS];
new Float:hpantes;

forward GodModeFunc();

public OnFilterScriptInit(){SetTimer("GodModeFunc",1000,1);return 1;}
public OnPlayerConnect(playerid){GodMode[playerid] = false;}
public OnFilterScriptExit(){return 1;}



public OnPlayerCommandText(playerid, cmdtext[]){
    if (strcmp("/hidanimortalmode", cmdtext, true, 17) == 0){
        if(GodMode[playerid] == false){
            GetPlayerHealth(playerid,hpantes);
            SetPlayerHealth(playerid,9999999);
            GodMode[playerid] = true;
            SendClientMessage(playerid,-1,"IMORTALIDADE {21DD00}LIGADO");
        }
        else
        {
            SetPlayerHealth(playerid,hpantes);
            GodMode[playerid] = false;
            SendClientMessage(playerid,-1,"IMORTALIDADE{E60000}DESLIGADO");
        }
        return true;
    }
    return 0;
}
public GodModeFunc(){
    for(new i;i < MAX_PLAYERS; i++){
        if(GodMode[i] == true){
            SetPlayerHealth(i,9999999);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)