[AJUDA]Erro No Tele de DM
#1

Bom Galera eae. Vem aki falar que sempre que crio um novo teleporte da erro. olha meus teles:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/Drift", true) == 0)
    {
    SetPlayerPos(playerid,-280.6368,1535.1832,75.3594);
    SetPlayerInterior(playerid, 0);
    SendClientMessage(playerid, 0x7FFF00AA,"Vocк foi para CountDown /Drift!");
    new Nome[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(string, sizeof(string), "%s Foi para CountDown ", Nome);
    SendClientMessageToAll(0xFF4500AA, string);
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), -280.6368,1535.1832,75.3594);
    SetPlayerPos(playerid, -280.6368,1535.1832,75.3594);
    SetVehicleZAngle(GetPlayerVehicleID(playerid), 128.0556);
    return 1;
    }
    return 1;
}

    if(strcmp(cmdtext, "/Drift2", true) == 0)
    {
        SetPlayerPos(playerid,2327.0950,1395.0078,42.8203);
        SetPlayerInterior(playerid, 0);
        SendClientMessage(playerid, 0x7FFF00AA,"Vocк foi para /Drift2!");
        new Nome[MAX_PLAYER_NAME], string[40];
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(string, sizeof(string), "%s Foi para Drift2", Nome);
        SendClientMessageToAll(0xFF4500AA, string);
        if(IsPlayerInAnyVehicle(playerid))
        {
            SetVehiclePos(GetPlayerVehicleID(playerid), 2327.0950,1395.0078,42.8203);
            SetPlayerPos(playerid, 2327.0950,1395.0078,42.8203);
            SetVehicleZAngle(GetPlayerVehicleID(playerid), 128.0556);
        }
        return 1;
    }
    return 0;
}

//TelePortes DM

        if(strcmp("/DM", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xF8FFFCAA, "Boa Sorte Voce Precisara");
        SendClientMessageToAll(-1,string);
        SetPlayerPos(playerid, 548.66491699,-1987.40795898,21.89083481);
        SetPlayerInterior(playerid, 0);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid,5, 1);
        GivePlayerWeapon(playerid, 16, 99999999999);
        GivePlayerWeapon(playerid, 22, 99999999999);
        GivePlayerWeapon(playerid, 30, 99999999999);
        GivePlayerWeapon(playerid, 31, 99999999999);
        GivePlayerWeapon(playerid, 34, 99999999999);
  }
        return 1;
    }
    return 0;
Olha Os De Drift estao tudo certinho Mas Qunado Teleporta O Player Nao Vai Junto Com Carro, Exemplo o carro teletransporta so que os player Nao fica dentro do carro ele sai do carro qunado teleporta, agora o DM Da Erro Na hora que complia, Sempre que add um novo teleporte da erro, Olha

Quote:

C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(200) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(214) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(216) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Queria Resolver O Bug do tele drift do carro, e ageitar esse erro, disculpe pelas muitas perguntas que fasso no forum, mas sou new no pawno entaum sempre da algo......
Reply
#2

podes postar o cуdigo entre [pawn] e [/pawn*] (sem usar o " * ")
Reply
#3

Tenta usar isso aqui nos Teleports de Drift:
pawn Код:
if(strcmp(cmdtext, "/drift", true) == 0) {
    if(IsPlayerInAnyVehicle(playerid)) {
    new VehicleID;
    VehicleID = GetPlayerVehicleID(playerid);
    SetVehiclePos(VehicleID, -280.6368,1535.1832,75.3594);
    new pname[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, pname, sizeof(Nome));
    format(string, sizeof(string), "%s Foi para CountDown ", pname);  
    SentClientMessage(playerid, 0x7FFF00AA, "Vocк foi para CountDown /Drift!");
    SetPlayerInterior(playerid,0);
 }
    else{
    new pname[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, pname, sizeof(Nome));
    format(string, sizeof(string), "%s Foi para CountDown ", pname);      
    SentClientMessage(playerid, 0x7FFF00AA, "Vocк foi para CountDown /Drift!");
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-280.6368,1535.1832,75.3594);
}
    return 1;
}

    if(strcmp(cmdtext, "/drift2", true) == 0) {
    if(IsPlayerInAnyVehicle(playerid)) {
    new VehicleID;
    VehicleID = GetPlayerVehicleID(playerid);
    SetVehiclePos(VehicleID, 2327.0950,1395.0078,42.8203);
    new pname[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, pname, sizeof(Nome));
    format(string, sizeof(string), "%s Foi para o Drift2 ( /drift2 ) ", pname);    
    SentClientMessage(playerid, 0x7FFF00AA, "Vocк foi para /Drift2!");
    SetPlayerInterior(playerid,0);
 }
   else{
    new pname[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, pname, sizeof(Nome));
    format(string, sizeof(string), "%s Foi para o Drift2 ( /drift2 ) ", pname);        
    SentClientMessage(playerid, 0x7FFF00AA, "Vocк foi para /Drift2!");
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,2327.0950,1395.0078,42.8203);
}
    return 1;
}
Nгo testei...
PS: Vc ta usando a mesma coordenada no teleport se o player for apй e de carro...
Pode acontecer DBs acidentais com isso...
Aconselho vc a mudar o SetPlayerPos para uma coordenada diferente do SetVeiclePost
Reply
#4

Mata_Noob meus Codes sгo identados de uma forma que eu consiga entender

Higor, aqui estб seu Code de DM, esse eu testei.
pawn Код:
if(strcmp(cmdtext, "/dm", true) == 0) {
    new pname[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s foi para a бrea de DM ( /dm )", pname);
    SendClientMessageToAll(-1, string);
    SetPlayerPos(playerid, 548.66491699,-1987.40795898,21.89083481);
    SetPlayerInterior(playerid, 0);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,5, 1);
    GivePlayerWeapon(playerid, 16, 999999);
    GivePlayerWeapon(playerid, 22, 999999);
    GivePlayerWeapon(playerid, 30, 999999);
    GivePlayerWeapon(playerid, 31, 999999);
    GivePlayerWeapon(playerid, 34, 999999);
    SendClientMessage(playerid, 0xF8FFFCAA, "Boa sorte! Vocк irб precisar.");
    return 1;
}
VEJA COMO VC TINHA FEITO:
pawn Код:
if(strcmp("/DM", cmdtext, true, 10) == 0)
{
    SendClientMessage(playerid, 0xF8FFFCAA, "Boa Sorte Voce Precisara");
    SendClientMessageToAll(-1,string); // O que isso ta fazendo aqui ? Ela n ta sendo usada...
    SetPlayerPos(playerid, 548.66491699,-1987.40795898,21.89083481);
    SetPlayerInterior(playerid, 0);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,5, 1);
    GivePlayerWeapon(playerid, 16, 99999999999);
    GivePlayerWeapon(playerid, 22, 99999999999);
    GivePlayerWeapon(playerid, 30, 99999999999);
    GivePlayerWeapon(playerid, 31, 99999999999);
    GivePlayerWeapon(playerid, 34, 99999999999);
}
   return 1;
}
Mata_Noob sou MEGA, HIPER, SUPER iniciante em Pawno, entao, qualquer ajuda que eu possa e consiga dar a alguem ja й um mйrito a min... (y)
Reply
#5

Mr Taxi, O Tele Que Vc me mandou esta dando erro ao compliar olha
Quote:

C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(134) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(144) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(164) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(183) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(200) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(202) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(215) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(217) : warning 203: symbol is never used: "pname"
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(217) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply
#6

Mata noob, vc mando o de drift, o que eu quero mesmo й o de DM please
Reply
#7

Tente esse



pawn Код:
if(!strcmp(cmdtext, "/dm", true)){
   SetPlayerPos(playerid, 548.66491699, ,-1987.40795898, 21.89083481);
   SetPlayerFacingAngle(playerid, 0.0);
   SetPlayerInterior(playerid, 0);
   SetPlayerVirtualWorld(playerid, 0);
   ResetPlayerWeapons(playerid);
   GivePlayerWeapon(playerid,5, 1);
   GivePlayerWeapon(playerid, 16, 99999999999);
   GivePlayerWeapon(playerid, 22, 99999999999);
   GivePlayerWeapon(playerid, 30, 99999999999);
   GivePlayerWeapon(playerid, 31, 99999999999);
   GivePlayerWeapon(playerid, 34, 99999999999);  
  return SendClientMessageToAll(playerid, 0xC66B00FF, "Alguem foi  para бrea de DM ( /dm  )");
}

O do drifter, com veiculo

pawn Код:
if(!strcmp(cmdtext, "/drift2", true)){
   if(!IsPlayerInAnyVehicle(playerid)){
       SetPlayerPos(playerid, 2327.0950, 1395.078, 42.8203);
       SetPlayerFacingAngle(playerid, 0.0);
       SetPlayerInterior(playerid, 0);
       SetPlayerVirtualWorld(playerid, 0);
   }
   else{
       new veh = GetPlayerVehicleID(playerid);
       SetVehiclePos(veh, 2327.0950, 1395.078, 42.8203);
       SetVehicleZAngle(veh, 0.0);
       LinkVehicleToInterior(veh, 0);
       SetVehicleVirtualWorld(veh, 0);
       PutPlayerInVehicle(playerid, veh, 0);
   }
   return SendClientMessage(playerid, 0xC66B00FF, "Vocк foi para /Drift2");
}
Reply
#8

Pow Sampizito, O Seu Chegou Perto Deu Sу Dois Erros, o do DM que eu to querendo olha
pawn Код:
if(!strcmp(cmdtext, "/dm", true)){
   SetPlayerPos(playerid, 548.66491699, ,-1987.40795898, 21.89083481);
   SetPlayerFacingAngle(playerid, 0.0);
   SetPlayerInterior(playerid, 0);
   SetPlayerVirtualWorld(playerid, 0);
   ResetPlayerWeapons(playerid);
   GivePlayerWeapon(playerid,5, 1);
   GivePlayerWeapon(playerid, 16, 99999999999);
   GivePlayerWeapon(playerid, 22, 99999999999);
   GivePlayerWeapon(playerid, 30, 99999999999);
   GivePlayerWeapon(playerid, 31, 99999999999);
   GivePlayerWeapon(playerid, 34, 99999999999);  
  return SendClientMessageToAll(playerid, 0xC66B00FF, "Alguem foi  para бrea de DM ( /dm  )");
}
Deu esses Erros Olha
Quote:

C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(199) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(211) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply
#9

Mata_Noob vejo que vc usou
pawn Код:
new string[40];
        SendClientMessageToAll(-1,string);
mais nao vi aonde vc colocou a menssagem que serб enviada na String, isso nao causarб erros ?
Reply
#10

Mata Noob, O Seu Ainda Ta Dando erro Olhem Meus Teles:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/Drift", true) == 0)
    {
    SetPlayerPos(playerid,-280.6368,1535.1832,75.3594);
    SetPlayerInterior(playerid, 0);
    SendClientMessage(playerid, 0x7FFF00AA,"Vocк foi para CountDown /Drift!");
    new Nome[MAX_PLAYER_NAME], string[40];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(string, sizeof(string), "%s Foi para CountDown ", Nome);
    SendClientMessageToAll(0xFF4500AA, string);
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), -280.6368,1535.1832,75.3594);
    SetPlayerPos(playerid, -280.6368,1535.1832,75.3594);
    SetVehicleZAngle(GetPlayerVehicleID(playerid), 128.0556);
    return 1;
    }
    return 1;
}

    if(strcmp(cmdtext, "/Drift2", true) == 0)
    {
        SetPlayerPos(playerid,2327.0950,1395.0078,42.8203);
        SetPlayerInterior(playerid, 0);
        SendClientMessage(playerid, 0x7FFF00AA,"Vocк foi para /Drift2!");
        new Nome[MAX_PLAYER_NAME], string[40];
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(string, sizeof(string), "%s Foi para Drift2", Nome);
        SendClientMessageToAll(0xFF4500AA, string);
        if(IsPlayerInAnyVehicle(playerid))
        {
            SetVehiclePos(GetPlayerVehicleID(playerid), 2327.0950,1395.0078,42.8203);
            SetPlayerPos(playerid, 2327.0950,1395.0078,42.8203);
            SetVehicleZAngle(GetPlayerVehicleID(playerid), 128.0556);
        }
        return 1;
    }
    return 0;
}

//DM
    if(strcmp("/DM", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xF8FFFCAA, "Boa Sorte Voce Precisara");
        new string[40];
        SendClientMessageToAll(-1,string);
        SetPlayerPos(playerid, 548.66491699,-1987.40795898,21.89083481);
        SetPlayerInterior(playerid, 0);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid,5, 1);
        GivePlayerWeapon(playerid, 16, 99999999999);
        GivePlayerWeapon(playerid, 22, 99999999999);
        GivePlayerWeapon(playerid, 30, 99999999999);
        GivePlayerWeapon(playerid, 31, 99999999999);
        GivePlayerWeapon(playerid, 34, 99999999999);
        }
    return 1;
    }
ERROS:
Quote:

C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(134) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(144) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(164) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(183) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(199) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(203) : error 021: symbol already defined: "SendClientMessageToAll"
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(214) : error 010: invalid function or declaration
C:\Users\Higor\Desktop\Meus Arquivos\Samp- Server New\gamemodes\AprendizDrift.pwn(216) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)