[Ajuda] Ajuda em comando
#1

E Ai galera, graзas ao andmeida10 eu vi esse codigo,

Код:
new cmd[128], idx;
cmd = strtok(cmdtext, idx);

if(strcmp(cmd,"/procurar",true) == 0)
    {
              new tmp[256];
                new giveplayerid;
                tmp = strtok(cmdtext, idx);
        giveplayerid = strval(tmp);
                if(!strlen(tmp)) return SendClientMessage(playerid,COR_BRANCO,"USO: /procurar [id]");
                if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "id invalido.");
                new Float:X,Float:Y,Float:Z;
                GetPlayerPos(giveplayerid, X,Y,Z);
                SetPlayerCheckpoint(playerid, X,Y,Z, 6);
        return 1;
    }
Mas eu queria botar pra sу os policiais usar, como faзo? ajudem ai por favor

e esses warnnings?
C:\Documents and Settings\Dogu\Desktop\Brasil Second Life\gamemodes\SLRP.pwn(26773) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Dogu\Desktop\Brasil Second Life\gamemodes\SLRP.pwn(26773) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#2

poste a linha 26773

e poste o nome da variavel da profissгo policial....
Reply
#3

Linha: SetPlayerPos(playerid, Px, Py, (Pz+3), Pa, -1);//JOGA PLAYER AO ALTO PARA DESBUGAR (NAO MATA)
Prof: esses 3
else if(level == 1) { PlayerInfo[para1][pChar] = 265; } //Policia Militar
else if(level == 2) { PlayerInfo[para1][pChar] = 285; } //B.O.P.E
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //Exйrcito
Reply
#4

a linha com erro substitua por esta
SetPlayerPos(playerid, x, y,z+3);

bom uma pergunta... seu sistema de profissхes й por nivel? nivel 1 profissгo militar e assim vai?

se for.....
pawn Код:
if(strcmp(cmd,"/procurar",true) == 0)
{
if(level > 3) {
SendClientMessage(playerid, COLOR_RED, "Sua profissгo nгo pode usar este comando!");
return 1;
}
new tmp[256];
new giveplayerid;
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,COR_BRANCO,"USO: /procurar [id]");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "id invalido.");                
new Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
return 1;
}
Reply
#5

й tipow, assim, pra dar lider bota, /lider id 1 ou /lider id 2 e assim vai
Reply
#6

Do jeito que tu falou la em cima deu 1 erro mas eu deixei como tava sу tirei Pa, -1 ficando assim:
SetPlayerPos(playerid, Px, Py, (Pz+3))
Sem erro nem warnning, e quanto a procura?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)