Auto Host Name Changer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Auto Host Name Changer (
/showthread.php?tid=200731)
Auto Host Name Changer -
Linus- - 19.12.2010
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.
Re: Auto Host Name Changer -
HyperZ - 19.12.2010
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;
}
Re: Auto Host Name Changer -
Linus- - 19.12.2010
Thanks and plz tell me how to make command type /nos to add nos in vehicle plz
Re: Auto Host Name Changer -
HyperZ - 19.12.2010
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