[DUV]Este comando tem algum erro? -
KiiS_TRUEPhone - 09.02.2011
Olб pessoal , estou aqui pedindo a vocкs que me tirem estб duvida , eu fiz este 3 Comandos, agora quero por no gm(mais como tenho medo de pega erros etc.. ) quero saber se estб ok para ser adicionado ao GM.
comando...
Код:
if(strcmp(cmd, "/abrirteste", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if (GetPlayerStat(playerid) == 2)
}
else
{
SendClientMessageToAll(playerid, COLOR_GREEN, " Teste Aberto digite,/irteste para entrar!");
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/fecharteste", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if (GetPlayerStat(playerid) == 2)
}
else
{
SendClientMessageToAll(playerid, COLOR_GREEN, " Teste Trancado!");
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/irteste",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(GetPlayerStat(playerid) == 2)
}
else
{
SetPlayerPos(playerid, 1416.107000,0.268620,1000.926000);
SetPlayerInterior(playerid,1);
Abrir teste, seria para abrir teste para virem Player *nгo precisando setar vida nem colete armas etc.*
Fechar teste seria para tranca-lo , ninguйm poderia usar o /irteste sem que fosse aberto pelo /abrirteste.
/irteste o player vai nas coordenadas do teste, eu abro e ele vai...
quero saber se foi isto que fiz , oque fiz , se fiz certo, tirem minha dъvida aк! , valeu.
Re: [DUV]Este comando tem algum erro? -
zSuYaNw - 09.02.2011
Olha aprovetei 5% do seu code.
pawn Код:
new bool:open;
new bool:Gato[MAX_PLAYERS];
if(strcmp(cmd, "/abrirteste", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(open == true)
{
SendClientMessageToAll(playerid, COLOR_GREEN, "Jб estб rodando um teste!");
return 0;
}
Gato[playerid] = true;
SendClientMessageToAll(playerid, COLOR_GREEN, " Teste Aberto digite,/irteste para entrar!");
}
}
return 1;
}
if(strcmp(cmd, "/fecharteste", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(open == false)
{
SendClientMessageToAll(playerid, COLOR_GREEN, "nгo estб rodando um teste!");
return 0;
}
Gato[playerid] = false;
SendClientMessageToAll(playerid, COLOR_GREEN, " Teste Trancado!");
}
}
return 1;
}
if(strcmp(cmd, "/irteste",true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(open == false)
{
SendClientMessageToAll(playerid, COLOR_GREEN, "nгo estб rodando um teste!");
return 0;
}
SetPlayerPos(playerid, 1416.107000,0.268620,1000.926000);
SetPlayerInterior(playerid,1);
return 1;
}
Re: [DUV]Este comando tem algum erro? -
deregudegu - 09.02.2011
Vocк poderia explicar esse codigo para que eu posso entender?
Re: [DUV]Este comando tem algum erro? -
Macintosh - 09.02.2011
Outro tуpico?