HELP :/ -
MiGu3X - 18.02.2013
Anyone knows how to make for players which aren't spaned or them they can't use commands? If so please give me the code since im looking everywhere but can't find.
thnx in advance migu3x.
Re: HELP :/ -
Boooth - 18.02.2013
Sorry, could you explain in more detail, I'm not quite understanding.
Respuesta: HELP :/ -
MiGu3X - 18.02.2013
When player isn't spawned and does.. /sync or /kill tell them, you cant use while not spawned
Re: HELP :/ -
DrDoom151 - 18.02.2013
pawn Код:
new bool:spawned[MAX_PLAYERS]=false;
OnPlayerSpawn(playerid..)
{
spawned[playerid]=true;
}
OnPlayerCommandText(playerid.....)
{
if(spawned[playerid]==true){
//All your commands
}
else SendClientMessage(playerid, 0xFFFFFF, "You have to spawn to use any commands.");
}
Re: HELP :/ -
SilverKiller - 18.02.2013
Here is an example...
First, Create a New Spawned like this:
pawn Код:
new bool:Spawned[MAX_PLAYERS];
Then on the request class AND OnPlayerConnect (as i understanded you , you meant that if he didnt choose a skin, he cant do a command)
After that, in your OnPlayerSpawn, Put this
pawn Код:
if(Spawned[playerid] == 0)
// Your code if he is not spawned
And to check if he is spawned:
pawn Код:
if(Spawned[playerid] == 1)
//Your code
Hope i helped.
EDIT: when i was typing the message the poster above me answered -_-
Re: HELP :/ -
Boooth - 18.02.2013
DrDoom your methods appear outdated, I'm going to assume you are going to use a command processor like zcmd or similar.
pawn Код:
new bool:spawned[MAX_PLAYERS] = false;
OnPlayerSpawn(playerid..)
{
spawned[playerid]=true;
}
OnPlayerCommandPerformed(playerid.....)
{
if(spawned[playerid] == false) return SendClientMessage(playerid, -1, "You need to login/spawn before you can use commands.");;
return1;
}
Something like that would be more efficient.
Re: HELP :/ -
DrDoom151 - 18.02.2013
Quote:
Originally Posted by Boooth
DrDoom your methods appear outdated, I'm going to assume you are going to use a command processor like zcmd or similar.
|
Obviously I use zcmd myself, but I don't know if he does, hence I made it in the default mode and he can change it himself.
Respuesta: HELP :/ -
MiGu3X - 18.02.2013
where it sas your commands, what do i put? im using zcmd
Re: Respuesta: HELP :/ -
SilverKiller - 18.02.2013
Quote:
Originally Posted by MiGu3X
where it sas your commands, what do i put? im using zcmd
|
Read my method, i said
pawn Код:
if(Spawned[playerid] == 0)
// Your code if he is not spawned
And to check if he is spawned:
pawn Код:
if(Spawned[playerid] == 1) // if he is spawned
//Your code
Respuesta: HELP :/ -
MiGu3X - 18.02.2013
where do I put the
if statements?