if(strcmp(cmdtext,"/castigar",true)==0)
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, COLOR_WHITE, "Usa: /castigar [ID]");
}
giveplayerid = strval(cmd);
if(AccountInfo[giveplayerid][aBloqueado] == 1) return SendClientMessage(playerid,COLOR_WHITE,"Ya esta bloqueado");
if (IsPlayerConnected(giveplayerid))
{
SetPlayerInterior(playerid,0);
TeleportPlayer(playerid,3970.806,642.907,44.383);
SendClientMessage(playerid, COLOR_WHITE, "COMPORTATE!");
GameTextForPlayer(playerid," ~w~ ESTAS ~r~ CASTIGADO!",10000,6);
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
AccountInfo[giveplayerid][aBloqueado] = 1;
format(string,sizeof(string),"* Has castigado a %s!",giveplayer);
SendClientMessage(playerid,COLOR_ADMIN,string);
format(string, sizeof(string), "AdminCmd: %s Te ha bloqueado los comandos",sendername);
SendClientMessage(giveplayerid,COLOR_ADMIN,string);
} else {
format(string, sizeof(string), "A quien esperas bloquear si el ID %d No esta conectado.", giveplayerid);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
if(!strcmp(cmdtext,"/castigar",true)){
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))return SendClientMessage(playerid, COLOR_WHITE, "Usa: /castigar [ID]");
new str[128], id = strval(tmp);
if(AccountInfo[id][aBloqueado] == 1) return SendClientMessage(playerid,COLOR_WHITE,"Ya esta bloqueado");
if(IsPlayerConnected(id)){
new name[2][MAX_PLAYER_NAME];
SetPlayerInterior(playerid,0);
TeleportPlayer(playerid,3970.806, 642.907, 44.383);
SendClientMessage(id, COLOR_WHITE, "COMPORTATE!");
GameTextForPlayer(id, " ~w~ ESTAS ~r~ CASTIGADO!", 10000, 6);
GetPlayerName(id, name[0], MAX_PLAYER_NAME);
GetPlayerName(playerid, name[1], MAX_PLAYER_NAME);
AccountInfo[giveplayerid][aBloqueado] = 1;
format(str, 128, "* Has castigado a %s!", name[0]);
SendClientMessage(playerid, COLOR_ADMIN, str);
format(str, 128, "AdminCmd: %s Te ha bloqueado los comandos", name[1]);
return SendClientMessage(id, COLOR_ADMIN, str);
}
else{
format(str, 128, "A quien esperas bloquear si el ID %d No esta conectado.", id);
return SendClientMessage(playerid, COLOR_WHITE, string);
}
}
intenta asi:
pawn Код:
|
Cambia: if(!strcmp(cmdtext,"/castigar",true))
Por: if(!strcmp(cmd,"/castigar",true)) |
TeleportPlayer(playerid,3970.806, 642.907, 44.383);
SetPlayerInterior(playerid, 0); cambia el texto en rojo por: id |