3 Questions..
#2

1.
pawn Код:
new String[500];
format(String,500,"Goto:%s\nGodmode:%s\nVehicleModel:%d",
(PlayerInfo[playerid][Goto]==1)?("{00FF00}Enable"):("{FF0000}Disable"),
(PlayerInfo[playerid][Godmode]==1)?("{00FF00}Enable"):("{FF0000}Disable"),
GetVehicleModel( GetPlayerVehicleID(playerid) ) );
ShowPlayerDialog(playerid,DIALOG_ID,2,"Stats",String,"change","Close");
2.
pawn Код:
SetTimer("CheckPing",8000,1);//8 seconds
forward CheckPing();
public CheckPing()
{
for(new i = 0 ; i < MAX_PLAYERS ; i++)
{
if(IsPlayerConnected(i)&&GetPlayerPing(i)>400)Kick(i);
}
}
3. For Hide use this: https://sampwiki.blast.hk/wiki/TogglePlayerClock
To create a Clock TD,you need 3 global variables: new Hour,Minute,Second, and a timer, SetTimer("Clock",1000,1); and this:
pawn Код:
forward Clock();
public Clock()
{
Second ++;
if(Second > 60) {
Second = 0; Minute += 1;
if(Minute > 60)
{
Hour += 1;
if(Hour > 24)
{
Hour = 1;
}
}
}
new string[50];
format(string,50,"%.02d:%.02d:%.02d",Hour,Minute,Second);
TextDrawSetString( TD, string);
}
Reply


Messages In This Thread
3 Questions.. - by vassilis - 08.11.2011, 12:04
Re: 3 Questions.. - by FarSe. - 08.11.2011, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)