[Ajuda]Comando X CheckPoit
#1

Boas tipo criei um emprego de bombeiro.

tipo ao usar o comando

PHP код:
if(!strcmp(cmdtext"/incendio"true))

tipo quem usar o comando /incendio envia uma mensagem ao Job id 21 a dizer "Incendio, va ate ao checkpoit"
a pessoa que usou o comando /incendio o checkpoit e marcado ai para que os bombeiros vao ate la.


Agradeзo mesmo
Reply
#2

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/incendio"true) == 0)
    {
        new 
Float:Pos[3];
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        for(new 
0MAX_PLAYERSi++)
        {
            if(
VARIAVEL[i] == 1) { SetPlayerCheckpoint(iPos[0], Pos[1], Pos[2], 8.0); }
        }
        return 
1;
    }
    return 
0;

Reply
#3

4 erros :S

Quote:

C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\pawno\include\utils.inc(51) : warning 219: local variable "count" shadows a variable at a preceding level
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(3359) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(3584) : warning 204: symbol is assigned a value that is never used: "cut"
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(6304) : warning 219: local variable "count" shadows a variable at a preceding level
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17439) : error 017: undefined symbol "VARIAVEL"
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17439) : warning 215: expression has no effect
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17439) : error 001: expected token: ";", but found "]"
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17439) : error 029: invalid expression, assumed zero
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17439) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#4

Mude VARIAVEL pela vбriavel bombeiro, no caso por exemplo ' BOMBEIRO ' ... ou JobId tem que vк.
Reply
#5

CLARO QUE VAI DAR ERRO !! Meu deus !

Troque VARIAVEL[i] == 1 pela variavel que define os bombeiros !

Preste mais atenзгo da proxima vez !
Reply
#6

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
CLARO QUE VAI DAR ERRO !! Meu deus !

Troque VARIAVEL[i] == 1 pela variavel que define os bombeiros !

Preste mais atenзгo da proxima vez !
*facepalm.
Reply
#7

PHP код:
if(!strcmp(cmdtext"/incendio"true)) // FBI/PSP
    
{
        new 
Float:Pos[3];
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        for(new 
0MAX_PLAYERSi++)
        
SendClientMessage(playeridCOLOR_BLUE"Vocк avisou todos os bombeiros em serviзo. Obrigado.");
        {
            if(
PlayerInfo[playerid][pJob] == 21) { SetPlayerCheckpoint(Pos[0], Pos[1], Pos[2]); }
            
SendClientMessage(playeridCOLOR_BLUE"Incкndio, vб atй гo checkpoit.");
        }
        return 
0;
    }
    return 
0;

vvarings
Quote:

C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17441) : warning 213: tag mismatch
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17441) : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17441) : warning 202: number of arguments does not match definition
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(17449) : warning 225: unreachable code

linha 17441
PHP код:
if(PlayerInfo[playerid][pJob] == 21) { SetPlayerCheckpoint(Pos[0], Pos[1], Pos[2]); } 
linha 17449 nao sei o que tem a ver mas da vvaring
PHP код:
if(!strcmp(cmdtext"/abrirportao"true)) // FBI/PSP 
Reply
#8

Troque isto:

PHP код:
if(PlayerInfo[playerid][pJob] == 21) { SetPlayerCheckpoint(Pos[0], Pos[1], Pos[2]); }
SendClientMessage(playeridCOLOR_BLUE"Incкndio, vб atй гo checkpoit."); 
Por isto:

PHP код:
if(PlayerInfo[i][pJob] == 21

    
SetPlayerCheckpoint(iPos[0], Pos[1], Pos[2], 8.0);
    
SendClientMessage(iCOLOR_BLUE"Incкndio, vб atй гo checkpoit.");

Reply
#9

PHP код:
if(!strcmp(cmdtext"/incendio"true)) // FBI/PSP
    
{
        new 
Float:Pos[3];
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        for(new 
0MAX_PLAYERSi++)
        
SendClientMessage(playeridCOLOR_BLUE"Vocк avisou todos os bombeiros em serviзo. Obrigado.");
        {
        if(
PlayerInfo[i][pJob] == 21)
        {
    
SetPlayerCheckpoint(iPos[0], Pos[1], Pos[2], 8.0);
    
SendClientMessage(iCOLOR_BLUE"Incкndio, vб atй гo checkpoit.");
        }
        return 
0;
    }
    return 
0;

Quote:

C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\pawno\include\utils.inc(51) : warning 219: local variable "count" shadows a variable at a preceding level
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(1743) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(1772) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(180 : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(1809) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(1836) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2303) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2314) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2326) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2330) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2342) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2346) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2350) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2354) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(235 : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2362) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2366) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2370) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2382) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2386) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2390) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2394) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(239 : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2410) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2414) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(241 : error 004: function "PlayerToPoint" is not implemented
C:\Users\Ricardo Moreira\Desktop\RedContry\RC-RP\gamemodes\RC-RP.pwn(2430) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Reply
#10

Isto deve resolver o seu problema .


Apenas retifiquei algumas coisas no cуdigo do Shadoww


pawn Код:
//Coloque na sua public OnPlayerCommandText:

if(!strcmp(cmdtext, "/incendio", true)) // FBI/PSP
    {
        new Float:Pos[3];
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        SendClientMessage(playerid, COLOR_BLUE, "Vocк avisou todos os bombeiros em serviзo. Obrigado.");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][pJob] == 21)
            {
                SetPlayerCheckpoint(i, Pos[0], Pos[1], Pos[2], 8.0);
                SendClientMessage(i, COLOR_BLUE, "Incкndio, vб atй гo checkpoit.");
            }
        }
        return true;
    }


Espero ter ajudado .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)