[Pedido] Ajuda grand - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Ajuda grand (
/showthread.php?tid=516207)
Ajuda grand -
yoki - 30.05.2014
pessoal preciso de uma ajuda grand ja antes dando umas pesquisada mais nao consegui achar como faz pra mim deixa este comando para vips e admin usa
PHP код:
COMMAND:jetpack(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/jetpack", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 2)
{
// Equip the player with a jetpack
SetPlayerSpecialAction(playerid, 2);
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
PELO O QUE EU SEI O DE VIP E ASSIM
Код:
if ( !IsPlayerVIP(playerid)) return SendClientMessage(playerid, Default, "[Erro]{FFFFFF} Vocк nгo й vip.");
MAIS EU QUERO DEIXA PRA ADM E VIP USA
Re: Ajuda grand -
victorlus - 30.05.2014
Bom nгo sei muito sobre pawn mais eu acho que isso da certo pra vips tenta ai !
PHP код:
COMMAND:jetpack(playerid, params[])
{
if (!IsPlayerVIP(playerid) == true) {
SendAdminText(playerid, "/jetpack", params);
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 2)
{
SetPlayerSpecialAction(playerid, 2);
}
else
return 0;
}
else
return 0;
return 1;
}
}else {
SendClientMessage(playerid, -1, "[Erro]Vocк nгo й vip.");
}
Re: Ajuda grand -
Smoking_Script - 30.05.2014
Tenta
Код:
COMMAND:jetpack(playerid, params[])
{
SendAdminText(playerid, "/jetpack", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (!IsPlayerVIP(playerid)) || APlayerData[playerid][PlayerLevel] >= 2)
{
SetPlayerSpecialAction(playerid, 2);
}
else
{
SendClientMessage(playerid, -1, " Vocк nгo й vip e nem ADM.");
return 1;
}
}
return 1;
}
Re: Ajuda grand -
Schocc - 30.05.2014
Acho que assim fica bom, pois envia o aviso do comando para os admins, logo em seguida verifica se o player й VIP, caso for verdade ele continua na estrutura condicional...
pawn Код:
COMMAND:jetpack(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/jetpack", params);
if (!IsPlayerVIP(playerid))
return SendClientMessage(playerid, Default, "[Erro]{FFFFFF} Vocк nгo й vip.");
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 2)
{
// Equip the player with a jetpack
SetPlayerSpecialAction(playerid, 2);
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Re: Ajuda grand -
PT - 30.05.2014
pawn Код:
COMMAND:jetpack(playerid, params[])
{
SendAdminText(playerid, "/jetpack", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (IsPlayerVIP(playerid)) || APlayerData[playerid][PlayerLevel] >= 2)
SetPlayerSpecialAction(playerid, 2);
else SendClientMessage(playerid, -1, " Vocк nгo й vip.");
}
return 1;
}