[Ajuda] 2 favores !!!
#1

01

pawn Код:
new neon = CreateObject(18648,0,0,0,0,0,0,100.0);
new neon1 = CreateObject(18648,0,0,0,0,0,0,100.0);
AttachObjectToVehicle(neon, GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(neon1, GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
como faзo um comando para retirar o neon ??

02
pawn Код:
CMD:contar(playerid, params[])
{
#pragma unused params
um comando contar .. ai quem tiver num raio de 50 metros sei-la.. ficaria congelado... e depois de contar.... descongelaria...
return true;
}
Alguem Poderia Ajudar??
Reply
#2

[quote=ApolloRJ;1243449]01

pawn Код:
new neon = CreateObject(18648,0,0,0,0,0,0,100.0);
new neon1 = CreateObject(18648,0,0,0,0,0,0,100.0);
AttachObjectToVehicle(neon, GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(neon1, GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
como faзo um comando para retirar o neon ??
[QUOTE]

PHP код:
CMD:rtunning(playeridparams[])
{
SendClientMessage(playerid,COR,"Tunning Removido!");
DestroyObject(neon);
DestroyObject(neon1);
return 
true;

Reply
#3

acho que vc n entendeu.. sгo 2 coisas.. uma e retirar o neon.. tentei isso ai.. que vc escreveu... deu erro..... a outra e um comando contar....... 5 4 3 2 1 gogogogogogo quem esti ver num raio de 50 metros...


pawn Код:
C:\ABA Programas\SA-MP 0.3c R2 Windows Server\gamemodes\GMFinal.pwn(8808) : error 017: undefined symbol "neon"
C:\ABA Programas\SA-MP 0.3c R2 Windows Server\gamemodes\GMFinal.pwn(8809) : error 017: undefined symbol "neon1"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
o que eu quero ali.. e o contar.. + o comando apagar... esta errado.. ja tentei varias coisa,,, e nгo vai pq... viu...
Reply
#4

tente dessa forma o Neon!

instalando tunning....
PHP код:
if(strcmp(cmdtext"/neon"true) == 0)
{
SendClientMessage(playerid,COR,"Neon Instalado!"); 
SetPVarInt(playerid"neon1"CreateObject(18648,0,0,0,0,0,0,100.0));
SetPVarInt(playerid"neon2"CreateObject(18648,0,0,0,0,0,0,100.0));
AttachObjectToVehicle(neon1GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
AttachObjectToVehicle(neon2GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
return 
1;

Removendo Neon...
PHP код:
if(strcmp(cmdtext"/rneon"true) == 0)
{
SendClientMessage(playerid,COR,"Neon Removido!"); 
DestroyObject(neon1);
DestroyObject(neon2); 
return 
1;

Reply
#5

e um comando contar alguem sabe como fazer?? ai quem tiver perto e congelado.... e tal...
Reply
#6

PHP код:
new Tick;
forward Tres(playerid);
forward Dois(playerid);
forward Um(playerid);
forward Congelar(playerid);
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/contar"true) == 0)
    {
        if(
GetTickCount() - Tick 5000) return SendClientMessage(playerid, -1"Aguarde 5 segundo para usar este comando !");
        if(
IsPlayerAdmin(playerid))
        {
            for(new 
0MAX_PLAYERS++)
            {
                new 
Float:Pos[3];
                
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
                if(
IsPlayerInRangeOfPoint(i12.0Pos[0], Pos[1], Pos[2]);
                {
                    
Tres(i);
                    
SetTimerEx("Congelar"4000false"i"i);
                    
Tick GetTickCount();
                    return 
1;
                }
            }
        }
        else return 
SendClientMessage(playerid, -1"Vocк nгo estб logado na RCON.");
    }
    return 
0;
}
public 
Tres(playerid)
{
    
SetTimerEx("Dois"1000false"i"playerid);
    
GameTextForPlayer(playerid"~r~3"10000);
    return 
1;
}
public 
Dois(playerid)
{
    
SetTimerEx("Um"1000false"i"playerid);
    
GameTextForPlayer(playerid"~b~2"10000);
    return 
1;
}
public 
Um(playerid)
{
    
GameTextForPlayer(playerid"~g~1"10000);
    return 
1;
}
public 
Congelar(playerid)
{
    
TooglePlayerControllable(playerid0);
    
GameTextForPlayer(playerid"~y~CONGELADO !"10000);
    return 
1;

Reply
#7

Shadoww5, use stocks em vez de publics.
PHP код:
stock Tresplayerid ) { SetTimerEx"Dois"1000false"i"playerid ); return GameTextForPlayerplayerid"~r~3"1000); }
stock Doisplayerid ) { SetTimerEx"Um"1000false"i"playerid ); return GameTextForPlayerplayerid"~b~w"1000); }
stock Umplayerid ) return GameTextForPlayerplayerid"~g~1"1000);
stock Congelarplayerid ) { TooglePlayerControllableplayerid); return GameTextForPlayerplayerid"~y~CONGELADO !"1000); } 
Reply
#8

Mas o SetTimer pode ser usado para "chamar" uma stock ?
Reply
#9

pawn Код:
new countttt;
new timerrrrrrr;
new bool:CountStart;
CMD:contar(playerid,params[])
{
    if(CountStart == true)
        return SendClientMessage(playerid,-1,"(error) jб existe uma contagem em andamento.");
    else
    {
        timerrrrrrr = SetTimerEx("Count",1000,true,"d",playerid);
        countttt = 5;
    }
    return true;
}


forward Count(playerid);
public Count(playerid)
{
   if(CountStart == false)
   {
       new Float:Float[3];
       GetPlayerPos(playerid,Float[0],Float[1],Float[2]);
       for(new x = 0; x != MAX_PLAYERS; x++)
       {
           if(IsPlayerInRangeOfPoint(x,50.0,Float[0],Float[1],Float[2]) && IsPlayerConnected(x)) continue;
           TogglePlayerControllable(x,false);
       }
       CountStart = true;
   }
   else
   {
       if(countttt != 0)
       {
           for(new x = 0; x != MAX_PLAYERS; x++)
           {
               new Str[6],Float:Float[3];
               GetPlayerPos(playerid,Float[0],Float[1],Float[2]);
               if(IsPlayerInRangeOfPoint(x,50.0,Float[0],Float[1],Float[2]) && IsPlayerConnected(x)) continue;
               format(Str,sizeof(Str),"~w~%d",countttt);
               GameTextForPlayer(x,Str,1000,6);

           }
           countttt--;
       }
       else
       {
           for(new x = 0; x != MAX_PLAYERS; x++)
           {
               new Float:Float[3];
               GetPlayerPos(playerid,Float[0],Float[1],Float[2]);
               if(IsPlayerInRangeOfPoint(x,50.0,Float[0],Float[1],Float[2]) && IsPlayerConnected(x)) continue;
               GameTextForPlayer(x,"~r~GO ~y~ GO ~b~~h~~h~GO!",1000,6);
           }
           KillTimer(timerrrrrrr);
       }
   }
   return true;
}
Reply
#10

Quote:
Originally Posted by [S]trong
Посмотреть сообщение
pawn Код:
new countttt;
new timerrrrrrr;
new bool:CountStart;
CMD:contar(playerid,params[])
{
    if(CountStart == true)
        return SendClientMessage(playerid,-1,"(error) jб existe uma contagem em andamento.");
    else
    {
        timerrrrrrr = SetTimerEx("Count",1000,true,"d",playerid);
        countttt = 5;
    }
    return true;
}


forward Count(playerid);
public Count(playerid)
{
   if(CountStart == false)
   {
       new Float:Float[3];
       GetPlayerPos(playerid,Float[0],Float[1],Float[2]);
       for(new x = 0; x != MAX_PLAYERS; x++)
       {
           if(IsPlayerInRangeOfPoint(x,50.0,Float[0],Float[1],Float[2]) && IsPlayerConnected(x)) continue;
           TogglePlayerControllable(x,false);
       }
       CountStart = true;
   }
   else
   {
       if(countttt != 0)
       {
           for(new x = 0; x != MAX_PLAYERS; x++)
           {
               new Str[6],Float:Float[3];
               GetPlayerPos(playerid,Float[0],Float[1],Float[2]);
               if(IsPlayerInRangeOfPoint(x,50.0,Float[0],Float[1],Float[2]) && IsPlayerConnected(x)) continue;
               format(Str,sizeof(Str),"~w~%d",countttt);
               GameTextForPlayer(x,Str,1000,6);

           }
           countttt--;
       }
       else
       {
           for(new x = 0; x != MAX_PLAYERS; x++)
           {
               new Float:Float[3];
               GetPlayerPos(playerid,Float[0],Float[1],Float[2]);
               if(IsPlayerInRangeOfPoint(x,50.0,Float[0],Float[1],Float[2]) && IsPlayerConnected(x)) continue;
               GameTextForPlayer(x,"~r~GO ~y~ GO ~b~~h~~h~GO!",1000,6);
           }
           KillTimer(timerrrrrrr);
       }
   }
   return true;
}
compilo bonito.. so n funciona =p e quando faзo o comando /contar.... n acontece nada.. e quando faзo denovo da (error) jб existe uma contagem em andamento alguem ajuda
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)