[AJUDA]Rapidi ( To com duvida nesse negocio de chaves)
#1

Quote:

C:\Users\Rene\Desktop\Jogos\Brasil Virtual - RPG\gamemodes\ThugLife26.pwn(2517) : error 010: invalid function or declaration
C:\Users\Rene\Desktop\Jogos\Brasil Virtual - RPG\gamemodes\ThugLife26.pwn(2519) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
 	if(gTeam[playerid] >= 3)
	{
		if (IsACopCar(vehicleid) && !ispassenger)
		{
			if(PlayerInfo[playerid][pLider]==1||PlayerInfo[playerid][pMembro]==1||PlayerInfo[playerid][pMembro]==17||PlayerInfo[playerid][pLider]==17) {}
		    else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Viatura"); }
		}
		if (IsAnAmbulanceCar(vehicleid) && !ispassenger)
		{
		    if(PlayerInfo[playerid][pMembro]==4||PlayerInfo[playerid][pLider]==4) { }
		    else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Ambulancia"); }
		}
		new string[256];
    	GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "* %s Entra no veiculo.", sendername);
		DetectorProx(5.0,playerid,string,ROXO);
	}
	return 1;
}
    CintoPlayer[playerid] = 0;
    GameTextForPlayer(playerid, "~r~/cinto Caso Contrario ~n~Morrer em Batidas", 3000, 4);
    return 1;
}
Urgente
Reply
#2

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(gTeam[playerid] >= 3)
    {
        if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLider]==1||PlayerInfo[playerid][pMembro]==1||PlayerInfo[playerid][pMembro]==17||PlayerInfo[playerid][pLider]==17) }
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Viatura"); }
        }
        if (IsAnAmbulanceCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pMembro]==4||PlayerInfo[playerid][pLider]==4)  }
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Ambulancia"); }
        }
        new string[256];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s Entra no veiculo.", sendername);
        DetectorProx(5.0,playerid,string,ROXO);
    }
    return 1;
}
    CintoPlayer[playerid] = 0;
    GameTextForPlayer(playerid, "~r~/cinto Caso Contrario ~n~Morrer em Batidas", 3000, 4);
    return 1;
}
Reply
#3

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(gTeam[playerid] >= 3)
    {
        if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLider]==1||PlayerInfo[playerid][pMembro]==1||PlayerInfo[playerid]            [pMembro]==17||PlayerInfo[playerid][pLider]==17) {}
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Viatura"); }
        }
        if (IsAnAmbulanceCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pMembro]==4||PlayerInfo[playerid][pLider]==4) { }
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Ambulancia"); }
        }
        new string[256];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s Entra no veiculo.", sendername);
        DetectorProx(5.0,playerid,string,ROXO);
    }
    CintoPlayer[playerid] = 0;
    GameTextForPlayer(playerid, "~r~/cinto Caso Contrario ~n~Morrer em Batidas", 3000, 4);
    return 1;
}
se funciono era so ajeita as linhas kkkk
Reply
#4

VLW adoro vcs
Reply
#5

Quote:
Originally Posted by rene20
Посмотреть сообщение
Deu mais erros ainda ( Ainda nao coloquei os resto dos codes se for isso me fala )
em qual dos posts deu tudo isso??
Reply
#6

Deu aquele erro de chave ajuda ai

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playerdinheiro;
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
/* CREEEEEEEEEEEEEEEEEEEEEUUUUUUUUUUUUUUUUUU */
if(strcmp(cmd, "/creu", true) == 0 || strcmp(cmd, "/crйu", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s estб danзando o Crйu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
ApplyAnimation(playerid,"CHOPPA","CHOPPA_back",4.1 ,1,1,1,1,1);
SendClientMessage(playerid, COLOR_DBLUE, "ЙЙЙЙ Creeeeeeu!");
return 1;
}

if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/chatvip", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pVIP] >= 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /cvip [Chat Vip]");
return 1;
}
format(string, sizeof(string), "** VIP %s: %s", sendername, result);
SendVIPMessage(0xFFCCFFAA,string);
printf("VIP %s: %s", sendername, result);
}
return 1;
}

if (strcmp(cmd, "/infodacasa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
InfoDaCasa();
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s olha as info da casa.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nao esta logado !");
}
}
return 1;
}
if(!strcmp(cmdtext, "/cinto", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(CintoPlayer[playerid] == 1)
{
CintoPlayer[playerid] = 1;
SendClientMessage(playerid,VERDE,"[AVISO]: Parabйns Vocк esta de Cinto, Agora Esta Protegido (/tirarcinto)");
SetPlayerWantedLevel(playerid, 0);
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
}
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta comCinto");
}
return 1;
}
if(!strcmp(cmdtext, "/tirarcinto", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(CintoPlayer[playerid] == 0)
{
CintoPlayer[playerid] = 0;
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer (/cinto)");
SetPlayerWantedLevel(playerid, 0);
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
}
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta sem Cinto");
}
return 1;
}
return 0;
}

Reply
#7

mas qual post vc uso lah no seu gm o meu ou do garfild??
Reply
#8

O seu
Reply
#9

mlz eu fis uma cagadinha ali no if de membro qnd postei esse eu compilei e deu se nao funfa vc tah com poka sorte
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(gTeam[playerid] >= 3)
    {
        if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLider]==1||PlayerInfo[playerid][pMembro]==1||PlayerInfo[playerid][pMembro]==17||PlayerInfo[playerid][pLider]==17) {}
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Viatura"); }
        }
        if (IsAnAmbulanceCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pMembro]==4||PlayerInfo[playerid][pLider]==4) { }
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Roubo de Ambulancia"); }
        }
        new string[256];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s Entra no veiculo.", sendername);
        DetectorProx(5.0,playerid,string,ROXO);
    }
    CintoPlayer[playerid] = 0;
    GameTextForPlayer(playerid, "~r~/cinto Caso Contrario ~n~Morrer em Batidas", 3000, 4);
    return 1;
}
Reply
#10

Mas tipo fui termina de coloca os codigos e deu erro nas Chaves


COdigo


Код:
//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
	new string[256];
	new playerdinheiro;
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new cmd[256];
	new tmp[256];
	new giveplayerid, moneys, idx;
	cmd = strtok(cmdtext, idx);
    /* CREEEEEEEEEEEEEEEEEEEEEUUUUUUUUUUUUUUUUUU */
    if(strcmp(cmd, "/creu", true) == 0 || strcmp(cmd, "/crйu", true) == 0)
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "* %s estб danзando o Crйu.", sendername);
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"CHOPPA","CHOPPA_back",4.1,1,1,1,1,1);
        SendClientMessage(playerid, COLOR_DBLUE, "ЙЙЙЙ Creeeeeeu!");
        return 1;
    }

	if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/chatvip", true) == 0)
	{
	    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pVIP] >= 1)
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USO: /cvip [Chat Vip]");
				return 1;
			}
			format(string, sizeof(string), "** VIP %s: %s", sendername, result);
			SendVIPMessage(0xFFCCFFAA,string);
			printf("VIP %s: %s", sendername, result);
		}
		return 1;
	}

    if (strcmp(cmd, "/infodacasa", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (gPlayerLogged[playerid] != 0)
			{
				InfoDaCasa();
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* %s olha as info da casa.", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Voce nao esta logado !");
			}
		}
		return 1;
	}
	if(!strcmp(cmdtext, "/cinto", true))
    {
    if(IsPlayerInAnyVehicle(playerid))
        {
        if(CintoPlayer[playerid] == 1)
        {
    CintoPlayer[playerid] = 1;
    SendClientMessage(playerid,VERDE,"[AVISO]: Parabйns Vocк esta de Cinto, Agora Esta Protegido (/tirarcinto)");
    SetPlayerWantedLevel(playerid, 0);
    }else{
    SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
    }
    }else{
    SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta comCinto");
    }
    return 1;
    }
    if(!strcmp(cmdtext, "/tirarcinto", true))
    {
    if(IsPlayerInAnyVehicle(playerid))
        {
        if(CintoPlayer[playerid] == 0)
        {
    CintoPlayer[playerid] = 0;
    SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer (/cinto)");
    SetPlayerWantedLevel(playerid, 0);
    }else{
    SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
    }
    }else{
    SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta sem Cinto");
    }
    return 1;
    }
    return 0;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)