/class command help
#1

Hey guys i need help how to make /class command.
I want to make when player type /class after 10 sec.
It should work similar like f4 to redirect you to class selection
Reply
#2

Create a timer and use ForceClassSelection(playerid);
Use the damn search function...
Reply
#3

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Create a timer and use ForceClassSelection(playerid);
Use the damn search function...
this is a forum and it is to ask, in case you had not heard
Reply
#4

This is an example of what jasper said;

PHP код:
forward ClassSelection(playerid);
public 
ClassSelection(playerid)
{
    
ForceClassSelection(playerid);
    return 
1;
}
CMD:class(playerid,params[])
{
    
SetTimerEx("ClassSelection"10000false"i"playerid);
    
SendClientMessage(playerid, -1,"[INFO] You'll be redirected to Class Selection after 10 seconds.");
    return 
1;

Reply
#5

Quote:
Originally Posted by RxErT
Посмотреть сообщение
This is an example of what jasper said;

PHP код:
forward ClassSelection(playerid);
public 
ClassSelection(playerid)
{
    
ForceClassSelection(playerid);
    return 
1;
}
CMD:class(playerid,params[])
{
    
SetTimerEx("ClassSelection"10000false"i"playerid);
    
SendClientMessage(playerid, -1,"[INFO] You'll be redirected to Class Selection after 10 seconds.");
    return 
1;

Very thx friend, u r great
Reply
#6

Quote:
Originally Posted by bookknp
Посмотреть сообщение
this is a forum and it is to ask, in case you had not heard
Right smartass it is to ask, but not for questions that have been asked a thousand times before. Use the search function. It would have taken you 3 seconds to find an example.
Reply
#7

Quote:
Originally Posted by RxErT
Посмотреть сообщение
This is an example of what jasper said;

PHP код:
forward ClassSelection(playerid);
public 
ClassSelection(playerid)
{
    
ForceClassSelection(playerid);
    return 
1;
}
CMD:class(playerid,params[])
{
    
SetTimerEx("ClassSelection"10000false"i"playerid);
    
SendClientMessage(playerid, -1,"[INFO] You'll be redirected to Class Selection after 10 seconds.");
    return 
1;

Hi again, I am trying to spawn after choosing class and it is blocked, Someone can help me??

Код:
CMD:class(playerid, params[])
{
  	SetTimerEx("ClassSelection", 10000, false, "i", playerid);
    SendClientMessage(playerid, -1,"[INFO] Cambio de clase en 10 segundos");

    return 1;
}
public ClassSelection(playerid)
{

    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);

    return 1;
}
Reply
#8

Quote:
Originally Posted by bookknp
Посмотреть сообщение
Hi again, I am trying to spawn after choosing class and it is blocked, Someone can help me??

Код:
CMD:class(playerid, params[])
{
  	SetTimerEx("ClassSelection", 10000, false, "i", playerid);
    SendClientMessage(playerid, -1,"[INFO] Cambio de clase en 10 segundos");

    return 1;
}
public ClassSelection(playerid)
{

    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);

    return 1;
}
What do you mean by blocked?
Could you explain please?
Reply
#9

Just tell me how you are enabling and disabling player spectating in the same time?

PHP код:

CMD
:class(playeridparams[])
{
      
SetTimerEx("ClassSelection"10000false"i"playerid);
    
SendClientMessage(playerid, -1,"[INFO] Cambio de clase en 10 segundos");

    return 
1;
}
public 
ClassSelection(playerid)
{

    
ForceClassSelection(playerid);
    
TogglePlayerSpectating(playeridtrue);    
    return 
1;
}

public 
OnPlayerSpawn(playerid)
{
    
TogglePlayerSpectating(playeridfalse);
    return 
1;

Reply
#10

Quote:
Originally Posted by RxErT
Посмотреть сообщение
Just tell me how you are enabling and disabling player spectating in the same time?

PHP код:

CMD
:class(playeridparams[])
{
      
SetTimerEx("ClassSelection"10000false"i"playerid);
    
SendClientMessage(playerid, -1,"[INFO] Cambio de clase en 10 segundos");
    return 
1;
}
public 
ClassSelection(playerid)
{
    
ForceClassSelection(playerid);
    
TogglePlayerSpectating(playeridtrue);    
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
TogglePlayerSpectating(playeridfalse);
    return 
1;

Код:
forward ClassSelection(playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)