ayuda con comando -
ProKiller1 - 15.09.2014
ayuda mi comando /aduty no sirve, tengo dos server uno es para probar las cosas antes de subirlas al server verdadero, pero lo curioso es que en el server de pruba si me sirve pero en el real no, y como vi que no funcionaba intente cambiar los gm osea puse el gm de prueba en el original y el real en el de pruba, pero de todos modos siguio sin funcionar el comando /aduty espero me ayuden y espero que entiendan lo que les estoy diciendo, o acaso me falta un plugin, en todo caso cual seria el plugin,
Respuesta: ayuda con comando -
Zume - 15.09.2014
Ah.. Y el comando que quieres arreglar?
Re: ayuda con comando -
ProKiller1 - 15.09.2014
Код:
CMD:aduty(playerid)
{
if(pInfo[playerid][pLogged] == 1)
{
if(pInfo[playerid][pAdminLevel] >= 1)
{
if(pInfo[playerid][pAdminDuty] == 0)
{
pInfo[playerid][pAdminDuty] = 1;
new adutyonstring[128];
format(adutyonstring, sizeof(adutyonstring), "%s is now on admin duty" ,PlayerName(playerid));
SendClientMessageToAll(-1,adutyonstring);
SetPlayerColor(playerid,COLOR_RED);
SetPlayerSkin(playerid,217);
SetPlayerHealth(playerid,999999.0);
SendClientMessage(playerid,COLOR_RED,"Remember to /aduty when you play as regular player.");
}
else
{
if(pInfo[playerid][pAdminDuty] == 1)
{
pInfo[playerid][pAdminDuty] = 0;
new adutyoffstring[128];
format(adutyoffstring, sizeof(adutyoffstring), "%s is now off admin duty" ,PlayerName(playerid));
SendClientMessageToAll(-1,adutyoffstring);
if(team[playerid] == TEAM_ZOMBIE)
{
SetPlayerColor(playerid,COLOR_ZOMBIE);
}
if(team[playerid] == TEAM_HUMAN)
{
SetPlayerColor(playerid,COLOR_HUMAN);
}
SetPlayerHealth(playerid,100);
}
}
}
}
else if(pInfo[playerid][pLogged] == 0)
{
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
Kick(playerid);
}
return 1;
}
ese es el cmd, tengo que definir algo?? o que pasa porque no funciona
Respuesta: ayuda con comando -
Zume - 15.09.2014
Intйntalo asн
pawn Код:
CMD:aduty(playerid){
new adutyonstring[128];
if(pInfo[playerid][pLogged] == 1){
if(pInfo[playerid][pAdminLevel] >= 1){
if(pInfo[playerid][pAdminDuty] == 0){
pInfo[playerid][pAdminDuty] = 1;
format(adutyonstring, sizeof(adutyonstring), "%s is now on admin duty" ,PlayerName(playerid));
SendClientMessageToAll(-1,adutyonstring);
SetPlayerColor(playerid,COLOR_RED);
SetPlayerSkin(playerid,217);
SetPlayerHealth(playerid,999999.0);
SendClientMessage(playerid,COLOR_RED,"Remember to /aduty when you play as regular player.");
}
else{
pInfo[playerid][pAdminDuty] = 0;
format(adutyoffstring, sizeof(adutyoffstring), "%s is now off admin duty" ,PlayerName(playerid));
SendClientMessageToAll(-1,adutyoffstring);
if(team[playerid] == TEAM_ZOMBIE){
SetPlayerColor(playerid,COLOR_ZOMBIE);
}
if(team[playerid] == TEAM_HUMAN){
SetPlayerColor(playerid,COLOR_HUMAN);
}
SetPlayerHealth(playerid,100);
}
}
}
else{
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
Kick(playerid);
}
return 1;
}
Por cierto, me parece que por el Kick no mostrarнa el mensaje, si es asн podrнas ver sobre el bug que tiene la funciуn "Kick":
https://sampforum.blast.hk/showthread.php?tid=417533
Respuesta: ayuda con comando -
OTACON - 15.09.2014
Quote:
Originally Posted by Zume-Zero
Intйntalo asн
pawn Код:
CMD:aduty(playerid){ new adutyonstring[128]; if(pInfo[playerid][pLogged] == 1){ if(pInfo[playerid][pAdminLevel] >= 1){ if(pInfo[playerid][pAdminDuty] == 0){ pInfo[playerid][pAdminDuty] = 1; format(adutyonstring, sizeof(adutyonstring), "%s is now on admin duty" ,PlayerName(playerid)); SendClientMessageToAll(-1,adutyonstring); SetPlayerColor(playerid,COLOR_RED); SetPlayerSkin(playerid,217); SetPlayerHealth(playerid,999999.0); SendClientMessage(playerid,COLOR_RED,"Remember to /aduty when you play as regular player."); } else{ pInfo[playerid][pAdminDuty] = 0; format(adutyoffstring, sizeof(adutyoffstring), "%s is now off admin duty" ,PlayerName(playerid)); SendClientMessageToAll(-1,adutyoffstring); if(team[playerid] == TEAM_ZOMBIE){ SetPlayerColor(playerid,COLOR_ZOMBIE); } if(team[playerid] == TEAM_HUMAN){ SetPlayerColor(playerid,COLOR_HUMAN); } SetPlayerHealth(playerid,100); } } } else{ SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!"); printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid)); Kick(playerid); } return 1; }
Por cierto, me parece que por el Kick no mostrarнa el mensaje, si es asн podrнas ver sobre el bug que tiene la funciуn "Kick": https://sampforum.blast.hk/showthread.php?tid=417533
|
el bug es con ambas funciones Kick y Ban.
https://sampwiki.blast.hk/wiki/Kick
https://sampwiki.blast.hk/wiki/Ban
saludos
Re: ayuda con comando -
ProKiller1 - 15.09.2014
mmm ahora me salta estas advertencias:
Код:
C:\Users\JulioCesar\Desktop\Gamemode\Gamemode\zGM.pwn(3472) : warning 219: local variable "adutyonstring" shadows a variable at a preceding level
C:\Users\JulioCesar\Desktop\Gamemode\Gamemode\zGM.pwn(8650) : warning 203: symbol is never used: "adutyonstring"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
LINEA 3472
Код:
new adutyonstring[128];
Respuesta: ayuda con comando -
Zume - 15.09.2014
Ya tienes definido "adutyonstring" en otra parte. cбmbiale todo lo que diga "adutyonstring" en ese comando a cualquier otra cosa
Re: ayuda con comando -
ProKiller1 - 15.09.2014
oooooo gracias ya me funciona, gracias Zume-Zero cmo se da reputacion xD soy nuevo y no se como xD
Re: ayuda con comando -
ProKiller1 - 15.09.2014
pfff que lastima pero de igual manera gracias