SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 20/07/2012, 08:42 PM   #1
brunoboy
Big Clucker
 
brunoboy's Avatar
 
Join Date: Aug 2011
Posts: 175
Reputation: 0
Default Erro no comando Teleporte

Ola eu estive pesquisando como criar um comando de Teleporte e encontrei um tutorial e la estava isto mas ta dando 3 Erros:

Code:
if(strcmp(cmdtext,"/ilha", true)==0)
    {
        GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~PEKENA ILHA ~y~~h~]]", 2500, 4);
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
    ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid,26,9999);
        new pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF}%s foi para uma Pekena Ilha  {FF0000}( /Ilha )", pname);
        SendClientMessageToAll(0xFF0000FF, string);
        return 1;
    }
Erro:
Code:
C:\Users\Vitor\Desktop\Meu Primeiro Server\gamemodes\Server.pwn(19) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\Meu Primeiro Server\gamemodes\Server.pwn(27) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Vitor\Desktop\Meu Primeiro Server\gamemodes\Server.pwn(30) : error 010: invalid function or declaration
C:\Users\Vitor\Desktop\Meu Primeiro Server\gamemodes\Server.pwn(33) : warning 203: symbol is never used: "pname"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
brunoboy is offline   Reply With Quote
Old 20/07/2012, 08:50 PM   #2
.FuneraL.
High-roller
 
.FuneraL.'s Avatar
 
Join Date: Feb 2012
Location: Notepad++
Posts: 2,071
Reputation: 146
Default Re: Erro no comando Teleporte

Retire o GetPlayerName e tente Compilar.
.FuneraL. is offline   Reply With Quote
Old 20/07/2012, 08:54 PM   #3
Panico622
Huge Clucker
 
Panico622's Avatar
 
Join Date: Jan 2012
Location: Los Santos-SA
Posts: 413
Reputation: 9
Default Re: Erro no comando Teleporte

pawn Code:
if(strcmp(cmdtext,"/ilha", true)==0)
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~PEKENA ILHA ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,9999);
    format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF}%s foi para uma Pekena Ilha  {FF0000}( /Ilha )", pname);
    SendClientMessageToAll(0xFF0000FF, string);
    return 1;
}
__________________
SAMP AINDA EXISTE ... LOL
:O
Panico622 is offline   Reply With Quote
Old 20/07/2012, 08:58 PM   #4
brunoboy
Big Clucker
 
brunoboy's Avatar
 
Join Date: Aug 2011
Posts: 175
Reputation: 0
Default Re : Erro no comando Teleporte

Ta tendo um erro agora Panico

Na linha 20:


Code:
if(strcmp(cmdtext,"/ilha", true)==0)         <-- Linha 20
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~PEKENA ILHA ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid,26,9999);
	format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF}%s foi para uma Pekena Ilha  {FF0000}( /Ilha )", pname);
	SendClientMessageToAll(0xFF0000FF, string);   return 1;}
brunoboy is offline   Reply With Quote
Old 20/07/2012, 08:59 PM   #5
Panico622
Huge Clucker
 
Panico622's Avatar
 
Join Date: Jan 2012
Location: Los Santos-SA
Posts: 413
Reputation: 9
Default Re: Erro no comando Teleporte

cal é a linha que da o erro?
__________________
SAMP AINDA EXISTE ... LOL
:O
Panico622 is offline   Reply With Quote
Old 20/07/2012, 09:00 PM   #6
brunoboy
Big Clucker
 
brunoboy's Avatar
 
Join Date: Aug 2011
Posts: 175
Reputation: 0
Default Re : Erro no comando Teleporte

Eu postei ai
brunoboy is offline   Reply With Quote
Old 20/07/2012, 09:04 PM   #7
@Riichard
High-roller
 
@Riichard's Avatar
 
Join Date: Feb 2012
Location: Brazil
Posts: 2,296
Reputation: 220
Default Re: Erro no comando Teleporte

O Erro não esta nesta linha, posta o comando/linhas de cima.
__________________

Fórum - Facebook - Twitter - TeamSpeak

Status: Indisponível
IP:

@Riichard is offline   Reply With Quote
Old 20/07/2012, 09:06 PM   #8
brunoboy
Big Clucker
 
brunoboy's Avatar
 
Join Date: Aug 2011
Posts: 175
Reputation: 0
Default Re : Erro no comando Teleporte

Eu estou criando um server do 0

E tudo que ele tem e isto :
Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

#endif

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Test");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

if(strcmp(cmdtext,"/ilha", true)==0)
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~PEKENA ILHA ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid,26,9999);
	format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF}%s foi para uma Pekena Ilha  {FF0000}( /Ilha )", pname);
	SendClientMessageToAll(0xFF0000FF, string);   return 1;}
brunoboy is offline   Reply With Quote
Old 20/07/2012, 09:12 PM   #9
Bruno Alves
Huge Clucker
 
Join Date: Jul 2012
Location: Maquiné/RS
Posts: 371
Reputation: 44
Default Re: Erro no comando Teleporte

pawn Code:
if (strcmp (cmdtext, "/ ilha", true) == 0)
{
    GameTextForPlayer (playerid, "~ y ~ ~ h ~]] ~ r ~ ~ h ~ PEKENA ILHA ~ y ~ ~ h ~]]", 2500, 4);
    SetPlayerInterior (playerid, 0);
    SetPlayerPos (playerid, 263.6730,2905.4475,7.4086);
    ResetPlayerWeapons (playerid);
    GivePlayerWeapon (playerid, 26,9999);
    format (string, sizeof (string), "{FF0000} [teleporte] {FFFFFF}% s FOI UMA parágrafo Pekena Ilha {FF0000} (/ Ilha)", pname);
    SendClientMessageToAll (0xFF0000FF, string);
    return 1;
}
Bruno Alves is offline   Reply With Quote
Old 20/07/2012, 09:13 PM   #10
Ades
Gangsta
 
Ades's Avatar
 
Join Date: May 2012
Location: Ji-Parana - RO ,Brazil
Posts: 782
Reputation: 63
Default Re: Erro no comando Teleporte

/\ para que include zcmd se você esta uzando strcmp ?
__________________
Projects :

[Map] Wrong way and the right way [||||||||||||||||||||]

[Map] [||||||||||||||||||||]



Ades 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Criando Comando de Teleporte Com Veículo .FuneraL. Lançamentos/Releases 6 30/04/2012 01:27 AM
comando de teleporte williamgato Português/Portuguese 4 14/01/2011 01:14 PM
Novo em Pawn, erro com Pickup de teleporte victor_h666 Português/Portuguese 4 29/12/2010 01:57 PM
[AJUDA] Fui por um teleporte e deu um erro Rafael_Nerd Português/Portuguese 4 11/01/2010 10:25 PM


All times are GMT. The time now is 08:21 PM.


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