Weather fast change instead of slowly changing
#10

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
pawn Код:
gettime(hour, minute);
   
    new string[60];
    format(string,sizeof string, "* Game Time: %02d:%02d",hour,minute);
    SendClientMessage(playerid, -1, string);
Tried on player connect and it works. Time is syncronized.
I've got this, what i did wrong?
PHP код:
...\cnr.pwn(9919) : error 017undefined symbol "hour"
...\cnr.pwn(9922) : error 017undefined symbol "hour"
...\cnr.pwn(9926) : error 021symbol already defined"string"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Here is my code, maybe i have messed something:

PHP код:
public OnPlayerConnect(playerid)
{
    new 
gHourgWorldTime;
gettime(.hour gHour);
gettime(.hour gWorldTime);
SetWorldTime(gWorldTime);
gettime(hourminute);
    new 
string[60];
       
format(string,sizeof string"* Game Time: %02d:%02d",hour,minute);
       
SendClientMessage(playerid, -1string);
    
TogglePlayerClock(playerid1); // Show the clock
    
    
new string[256],Query[200];
    
GetPlayerName(playeridPlayerInfo[playerid][pName], 128);
    
GetPlayerIp(playeridPlayerInfo[playerid][pIP], 50);
    
ResetAllPlayerStats(playerid);
    
    
SetPlayerColor(playeridCOLOR_DEAD);
       if (
IsPlayerNPC(playerid))
    {
    
/*new ip_addr_npc[64+1];
    new ip_addr_server[64+1];
    GetServerVarAsString("bind",ip_addr_server,64);
    GetPlayerIp(playerid,ip_addr_npc,64);
    if(!strlen(ip_addr_server)) {
     ip_addr_server = "127.0.0.1";
    }
    if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {
     // this bot is remote connecting
      printf("NPC: Remote NPC Attempting To Connect From %s And I'm Kicking It.",ip_addr_npc);
      Kick(playerid);
      return 0;......
..............................
........................and so on continues 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)