[Ajuda] Erro comando /carregar e /descarregar !
#1

Tentei fazer um comando para que o player possa /carregar e /descarregar encima de um Checkpoint, mas ta dando erro, alguйm me ajuda ?

Variavel:

PHP Code:
new ccarregado 1
/Carregar

PHP Code:
CMD:carregar(playeridparams[])
{
    new 
VehicleID;
    
VehicleID GetPlayerVehicleID(playerid);
    new 
modelo;
    
modelo GetVehicleModel(VehicleID);
    if(
modelo == 413)
    if(
IsPlayerInRangeOfPoint(playerid2473.4294,-1698.2968,13.5178,9.5))
    if(
ccarregado == 1)
    
SendClientMessage(playerid"| MERCADORIA | Foi marcado um checkpoint em seu mapa, leve a mercadoria atй lб para ser entregue!");
    return 
1;

E agora o comando /Descarregar

PHP Code:
CMD:descarregar(playeridparams[])
{
    new 
VehicleID;
    
VehicleID GetPlayerVehicleID(playerid);
    new 
modelo;
    
modelo GetVehicleModel(VehicleID);
    if(
modelo == 413)
    if(
IsPlayerInRangeOfPoint(playerid1544.3640,16.4791,24.1406,9.5))
    if(
ccarregado == 0)
    
SendClientMessage(playerid"| MERCADORIA | O seu forgгo nгo estava carregado com a mercadoria, volte para busca-lo!");
    return 
1;

Linha de erros:

pawn Code:
C:\Users\lucas\Documents\SA-MP\servidor em construзгo\gamemodes\inicio.pwn(73) : warning 213: tag mismatch
C:\Users\lucas\Documents\SA-MP\servidor em construзгo\gamemodes\inicio.pwn(73) : warning 202: number of arguments does not match definition
C:\Users\lucas\Documents\SA-MP\servidor em construзгo\gamemodes\inicio.pwn(495) : error 035: argument type mismatch (argument 2)
C:\Users\lucas\Documents\SA-MP\servidor em construзгo\gamemodes\inicio.pwn(508) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Obrigado !
Reply
#2

Tenta colocar os brackets.
Reply
#3

SendClientMessage possui 3 parвmetros obrigatуrios. Vocк sу usou 2:

https://sampwiki.blast.hk/wiki/SendClientMessage
Reply
#4

Quote:
Originally Posted by Luan Argolo
View Post
Tenta colocar os brackets.
Poderia dar uma arrumada pra mim por favor ? Os Brackets me atrapalham muito :c

@Edit

Quote:
Originally Posted by arakuta
View Post
SendClientMessage possui 3 parвmetros obrigatуrios. Vocк sу usou 2:

https://sampwiki.blast.hk/wiki/SendClientMessage
Uma coisa boba e eu nao vi, obrigado rs

Obs.: O meu codigo serial funcional ? (carregar e descarregar em checkpoint)
Reply
#5

A coisa mais fбcil й os brackets e, como o arakuta disse, falta o parвmetro da cor. E, sobre os brackets faзa desse jeito.
PHP Code:
CMD:oi(playerid) {
    if(
Funcao == 1) {
        
SendClientMessage(playerid, -1"* Oi");
    }
    return 
1;

E, tambйm estude sobre a funзгo do jogador entrar no checkpoint.
• Link: https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint

Abraзos,
Reply
#6

Jб consegui entender sobre a funзгo em geral do checkpoint, porem, eu queria ter uma base de como funciona o comando carregar e descarregar, poderia me mostrar ? Obrigado !
Reply
#7

Use SetPlayerCheckpoint para criar o checkpoint e DisablePlayerCheckpoint para desabilitar o checkpoint.
E, use DisablePlayerCheckpoint para quando ele entrar no checkpoint.
Se precisar mais de ajuda, use o search.

Abraзos,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)