YCMD:llamar(playerid, params[], help)
{
if(!sscanf(params, "i", params[0]))
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pTelefono] == params[0] && i != playerid)
{
new llamador[256], llamado[256];
format(llamador, sizeof(llamador), "%s saca el telefono", GetName(playerid));
ProxDetector2(30, playerid, llamador,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
if(!IsPlayerConnected(i))
{
new noconectado[256];
format(noconectado, sizeof(noconectado), "%s guarda el telefono", GetName(playerid));
ProxDetector2(30, playerid, noconectado,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El telefono se encuentra apagado o fuera de covertura, intentelo de nuevo mбs tarde");
}
else
{
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"Llamando");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
}
break;
}
else
{
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El numero al que llama no existe");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
break;
}
}
}
else SendClientMessage(playerid, COL_AYUDA, "Uso: "COL_WHITE"/llamar [numero]");
return 1;
}
YCMD:llamar(playerid, params[], help){
new numero, data[200];
if(sscanf(params, "d", numero)) return SendClientMessage(playerid, COL_AYUDA, "Uso: "COL_WHITE"/llamar [numero]");
for(new player, user = GetMaxPlayers(); player != user; player++){
if(player == playerid) continue;
if(IsPlayerConnected(player)){
if(PlayerInfo[player][pTelefono] == numero){
format(data, sizeof(data), "%s saca el telefono", GetName(playerid));
ProxDetector2(30, playerid, data,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"Llamando");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
break;
}else{
format(data, sizeof(data), "%s guarda el telefono", GetName(playerid));
ProxDetector2(30, playerid, data,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El numero al que llama no existe");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
break;
}
}else{
format(data, sizeof(data), "%s guarda el telefono", GetName(playerid));
ProxDetector2(30, playerid, data,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El telefono se encuentra apagado o fuera de covertura, intentelo de nuevo mбs tarde");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
break;
}
}
return true;
}
pawn Код:
|
YCMD:llamar(playerid, params[], help)
{
if(!sscanf(params, "i", params[0]))
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pTelefono] == params[0] && i != playerid)
{
new llamador[256], llamado[256];
format(llamador, sizeof(llamador), "%s saca el telefono", GetName(playerid));
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE); // animacion cogiendo telefono
ProxDetector2(30, playerid, llamador,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
if(!IsPlayerConnected(i))
{
new noconectado[256];
format(noconectado, sizeof(noconectado), "%s guarda el telefono", GetName(playerid));
ProxDetector2(30, playerid, noconectado,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El telefono se encuentra apagado o fuera de covertura, intentelo de nuevo mбs tarde");
}
else
{
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"Llamando");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
}
break;
}
else
{
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El numero al que llama no existe");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
break;
}
}
}
else SendClientMessage(playerid, COL_AYUDA, "Uso: "COL_WHITE"/llamar [numero]");
return 1;
}
YCMD:llamar(playerid, params[], help)
{
new numero, data[200];
if(sscanf(params, "d", numero)) return SendClientMessage(playerid, COL_AYUDA, "Uso: "COL_WHITE"/llamar [numero]");
for(new player, user = GetMaxPlayers(); player != user; player++)
{
if(player != playerid && IsPlayerConected(player) && PlayerInfo[player][pTelefono] == numero)
{
format(data, sizeof(data), "%s saca el telefono", GetName(playerid));
ProxDetector2(30, playerid, data,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"Llamando");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
break;
}
else
{
format(data, sizeof(data), "%s guarda el telefono", GetName(playerid));
ProxDetector2(30, playerid, data,0xC2A2DAAA,0xAA8EBFAA,0x947BA6AA,0x7D688CAA,0x665573AA);
SendClientMessage(playerid, 0xFFCC26AA, "Operadora: "COL_WHITE"El numero al que llama no existe");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
break;
}
}
return 1;
}
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
printf("act: %i", GetPlayerSpecialAction(playerid));
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);