10.01.2013, 17:38
Код:
if (strcmp("/desbloquear", cmdtext, true, 10) == 0)
{
new jugador;
tmp = strtok(cmdtext, idx);
jugador = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "* Usa: /desbloquear <ID>");
if (strval(tmp) == playerid) return SendClientMessage(playerid, COLOR_RED, "* Error: No puedes desbloquearte tu mismo!");
if (IsPlayerConnected(jugador))
{
if(Informacion[playerid][Bloqueado] == 1)
{
format(string2,sizeof(string2),"* Desbloqueado. Ahora %s se podra teletransportar hacia ti!",PlayerName2(jugador));
SendClientMessage(playerid,COLOR_RED,string2);
format(string2,sizeof(string2),"* %s Te dejo que te teletransportes hacia el.",PlayerName2(playerid));
SendClientMessage(jugador,COLOR_RED,string2);
Informacion[playerid][Bloqueado] = 0;
return 1;
} else return SendClientMessage(playerid, 0x33CCFFAA, "* Ya estas desbloqueado, usa /bloquear para bloquear la teletransportaciуn.");
}
else return SendClientMessage(playerid, red, "* El jugador no esta conectado!");
}
if (strcmp("/ir", cmd, true, 10) == 0)
{
new jugador;
tmp = strtok(cmdtext, idx);
jugador = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "* Usa: /ir <ID>");
if (strval(tmp) == playerid) return SendClientMessage(playerid, COLOR_RED, "* Error: No puedes teletransportarte hacia ti mismo.");
if (IsPlayerConnected(jugador))
{
if(Informacion[jugador][Bloqueado] == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(jugador, x, y, z);
TeleportPlayer(playerid, x + 2, y, z);
format(string2,sizeof(string2),"* El usuario %s se teletransporto hacia ti, Para impedir eso usa /bloquear",PlayerName2(playerid));
SendClientMessage(jugador,0xFFFF00AA,string2);
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "* El jugador prohibio que te teletransportes hacia el.");
}
else return SendClientMessage(playerid, COLOR_RED, "* Error: ID no encontrada!");
}
if (strcmp("/bloquearir", cmdtext, true, 10) == 0)
{
new jugador;
tmp = strtok(cmdtext, idx);
jugador = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "* Usa: /bloquearir <ID>");
if (strval(tmp) == playerid) return SendClientMessage(playerid, COLOR_RED, "* Error: No puedes bloquearte tu mismo!");
if (IsPlayerConnected(jugador))
{
if(Informacion[playerid][Bloqueado] == 0)
{
format(string2,sizeof(string2),"* Bloqueado. Ahora %s no se podra teletransportar hacia ti!",PlayerName2(jugador));
SendClientMessage(playerid,COLOR_RED,string2);
format(string2,sizeof(string2),"* %s Te bloqueo la teletransportacion hacia el.",PlayerName2(playerid));
SendClientMessage(jugador,COLOR_RED,string2);
Informacion[playerid][Bloqueado] = 1;
return 1;
}
else return SendClientMessage(playerid, 0x33CCFFAA, "* Ya estas bloqueado, usa /desbloquear para desbloquear la teletransportaciуn.");
}
else return SendClientMessage(playerid, red, "* El jugador no esta conectado!");
}
Me ayudan?dx


Gracias.. Pero me da estй error: