RCON skin
#1

1.How add at the :/rcon login.. skin?
2.How add a timer to 10 seconds at this command:
Код:
//Comanda rac
 	if(strcmp(cmdtext, "/rac", true) == 0 || strcmp(cmdtext, "/respawnallcars", true) == 0)
	{
	if(!IsPlayerAdmin(playerid))
	return
	SendClientMessage(playerid,ROSU,"ERROR: You are not an administrator");
	new vh=CreateVehicle(400,0.0,0.0,0.0,0.0,-1,-1,-1);
  	DestroyVehicle(vh);
  	new p[MAX_VEHICLES];
  	for(new v = 0; v < vh; v++){
  	p[v]=0;
  	for(new i = 0; i < GetMaxPlayers(); i++){
	if(IsPlayerInVehicle(i,v)) p[v]=1;
	}
	if(p[v]==0) SetVehicleToRespawn(v);
	}
    new string[64];
	GetPlayerName(playerid,string,MAX_PLAYER_NAME);
    format(string, 63, "Admin %s a dat respawn tuturor vehiculelor dupa server!", string);
    SendClientMessageToAll(ALB, string);
	return 1;
    }
Reply
#2

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
		SetPlayerSkin(playerid, skinid);
    }
    return 1;
}
Reply
#3

You mean a RCON setskin command? In that case,

pawn Код:
public OnRconCommand(cmd[])
{
    new operation, operand1, operand2;
    if(sscanf(params, "sud", operation, operand1, operand2))
    {
        print("USAGE: command operand1 operand2");
    }
   
    if(strcmp(operation, "setskin", true) == 0)
    {
        if(IsPlayerConnected(operand1))
        {
            if(operand2 >= 0 && operand2 <= 299)
            {
                SetPlayerSkin(operand1, operand2);
               
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(operand1, pName, sizeof(pName));
                printf("You have set %s(%d)'s skin to %d!", pName, operand1, operand2);
               
                return 1;
            }
        }
    }
    return 1;
}
And if you are talking about setting a skin when a player logs in via RCON(ingame) try using the OPRL include:
https://sampforum.blast.hk/showthread.php?tid=491835
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)