[AJUDA] Ir mais pra frente quando apertar espaзo
#3

Assim:

Topo GM:
pawn Код:
new CorreCara[MAX_PLAYERS];
Agora Final GM:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))//TECLA QUE ATIRA
    {
     if(CorreCara[playerid] == 1){
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    SetPlayerPos(playerid, X+10, Y, Z);//Sу Ira Aumentar para Lado X
    }
}
    return 1;
}
Agora comando para Liberar os "CORRER"

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp(cmdtext, "/correon", true))
  {
   CorreCara[playerid] = 1;  
   return 1;  
  }
 if(!strcmp(cmdtext, "/correoff", true))
  {
   CorreCara[playerid] = 0;  
   return 1;  
  }
  return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)