dcmd_ban(playerid, params)
{
if(PlayerInfo[playerid][Nivel] >= 3){
new tmp[256], tmp2[256]m Index;
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
if(!strlen(params))return SendClientMessage(playerid, 0xFFFFFFFF, "Uso: /ban [ID] (opcional)[Razуn]");
new id, name[MAX_PLAYER_NAME], str[128];
id = strval(tmp);//faltaba esta linea fundamental
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID || id == playerid)return SendClientMessage(playerid, Rojo, "Jugador no Conectado");
GetPlayerName(id, name, sizeof(name));
if(!strlen(tmp2))format(str, sizeof(str), "***%s (id: %i) Fue Baneado por un admin. [Razуn: No se dio]", nombre, id);
else format(str, sizeof(str), "***%s (id: %i) Fue Baneado por un admin. [Razуn: %s]", nombre, id, params[2]);
SendClientMessageToAll(Rojo, str);
return ban(id);
}else return SendClientMessage(playerid, Rojo, "Que intentas?");
}
ya, el codigo estaba mal xD
PD: ahora no vas a poder banearte a ti mismo. pawn Code:
|
C:\Documents and Settings\Usuario\Mis documentos\Downloads\Compressed\samp1\filterscripts\sistemas.pwn(2079) : error 001: expected token: ";", but found "-identifier-" C:\Documents and Settings\Usuario\Mis documentos\Downloads\Compressed\samp1\filterscripts\sistemas.pwn(2079) : error 017: undefined symbol "m" C:\Documents and Settings\Usuario\Mis documentos\Downloads\Compressed\samp1\filterscripts\sistemas.pwn(2079) : error 017: undefined symbol "Index" C:\Documents and Settings\Usuario\Mis documentos\Downloads\Compressed\samp1\filterscripts\sistemas.pwn(2079) : fatal error 107: too many error messages on one line
dcmd_ban(playerid, params)
{
if(PlayerInfo[playerid][Nivel] >= 3){
new tmp[256], tmp2[256]m Index; // Linea 2079 aca esta el error
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
if(!strlen(params))return SendClientMessage(playerid, 0xFFFFFFFF, "Uso: /ban [ID] (opcional)[Razуn]");
new id, name[MAX_PLAYER_NAME], str[128];
id = strval(tmp);//faltaba esta linea fundamental
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID || id == playerid)return SendClientMessage(playerid, Rojo, "Jugador no Conectado");
GetPlayerName(playerid, name, sizeof(name));
if(!strlen(tmp2))format(str, sizeof(str), "***%s (id: %i) Fue Baneado por un admin. [Razуn: No se dio]", nombre, id);
else format(str, sizeof(str), "***%s (id: %i) Fue Baneado por un admin. [Razуn: %s]", nombre, id, params[2]);
SendClientMessageToAll(Rojo, str);
return ban(id);
}else return SendClientMessage(playerid, Rojo, "Que intentas?");
}
new tmp[256], tmp2[256]m Index;
new tmp[256], tmp2[256], Index;
cambia:
pawn Code:
pawn Code:
me pasa xq generalmente escribo el codigo aca xD |
Altos problemas... :S aora voi a probarlo al sistema xD
![]() ![]() |
їPor quй 256 si la mбximo de capacidad de un comando es 128?
|
dcmd_explode(playerid, params[]){
if(PlayerInfo[playerid][Logged] == 1 || IsPlayerAdmin(playerid)){
if(PlayerInfo[playerid][Level] >= 3){
new tmp[256], tmp2[256], Index;
tmp = strtok(params,Index);
tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /explode <playerid>");
new jugador, playername[MAX_PLAYER_NAME], str[128], Float:x, Float:y, Float:z;
jugador = strval(tmp);
if(IsPlayerConnected(jugador)){
if(jugador != INVALID_PLAYER_ID){
if(PlayerInfo[jugador][Level] <= PlayerInfo[playerid][Level]){
GetPlayerName(jugador, playername, sizeof(playername));
SendClientMessage(jugador, COLOR_YELLOW, "Has sido explotado por un admin");
format(str, sizeof(str), "Has explotado a %s", playername);
SendClientMessage(playerid, COLOR_YELLOW, str);
SendClientMessageToAdmins(playerid, "Explode");
GetPlayerPos(jugador, x, y, z);
return CreateExplosion(x, y, z, 7, 0.1);
}else return SendClientMessage(playerid, COLOR_RED, "ERROR: ID Incorrecto");
}else return SendClientMessage(playerid, COLOR_RED, "ERROR: ID Incorrecto");
}else return SendClientMessage(playerid, COLOR_RED, "ERROR: El jugador no se encuentra conectado");
}else return SendClientMessage(playerid, COLOR_RED, "ERROR: No posees el nivel de admin suficnete para usar este comando");
}else return SendClientMessage(playerid, COLOR_RED, "ERROR: Debes estar logueado para usar este comando");
}
dcmd_ban(playerid, params)
{
if(PlayerInfo[playerid][Nivel] >= 3){
new tmp[256], tmp2[256]m Index; // Linea 2079 aca esta el error
tmp = strtok(params, Index);
tmp2 = strtok(params, Index);
if(!strlen(params))return SendClientMessage(playerid, 0xFFFFFFFF, "Uso: /ban [ID] (opcional)[Razуn]");
new id, name[MAX_PLAYER_NAME], str[128];
id = strval(tmp);//faltaba esta linea fundamental
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID || id == playerid)return SendClientMessage(playerid, Rojo, "Jugador no Conectado");
GetPlayerName(id, name, sizeof(name));
if(!strlen(tmp2))format(str, sizeof(str), "***%s (id: %i) Fue Baneado por un admin. [Razуn: No se dio]", nombre, id);
else format(str, sizeof(str), "***%s (id: %i) Fue Baneado por un admin. [Razуn: %s]", nombre, id, params[2]);
SendClientMessageToAll(Rojo, str);
return ban(id);
}else return SendClientMessage(playerid, Rojo, "Que intentas?");
}