Auto Host Name Changer
#1

Hello
i need help
how to make auto name changer will change the server name after every 3 seconds
Example:

Stunt

After 3 Secs:
Dm

After 3 Secs:
Race

Please help me
Thanks.
Reply
#2

pawn Код:
new hn;//global variable

//Under ongamemodeinit
SetTimer("changehost", 3000,1); // it will change the server name after every 3 seconds


forward changehost();
public changehost()
{
    switch(hn)
    {
    case 0:
    {
    SendRconCommand("hostname  Stunt");
    hn++;
    }
    case 1:
    {
    SendRconCommand("hostname Dm");
    hn++;
    }
    case 2:
    {
    SendRconCommand("hostname Race");
    hn = 0;
    }
    }
    return 1;
}
Reply
#3

Thanks and plz tell me how to make command type /nos to add nos in vehicle plz
Reply
#4

Quote:
Originally Posted by Linus-
Посмотреть сообщение
Thanks and plz tell me how to make command type /nos to add nos in vehicle plz
Lol
Put this under onplayercommand text:
pawn Код:
if (strcmp("/nos", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid)) {
            switch(GetVehicleModel( GetPlayerVehicleID(playerid) )) {
                case 448,461,462,463,468,471,509,510,521,522,523,581,586,449:
                return SendClientMessage(playerid, 0xFF0000AA,"ERROR: You can not tune this vehicle!");
            }
            AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
            PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
        } else return SendClientMessage(playerid, 0xFF0000AA,"ERROR: You must be in a vehicle.");
        return 1;
    }
And check this. https://sampwiki.blast.hk/wiki/AddVehicleComponent
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)