public OnPlayerConnect(playerid)
{
TogglePlayerClock(playerid, 1); // Show the clock (i don't want to show the clock because i already made the clock textdraw.
..................other codes
gamemodes\cnr.pwn(3237) : error 021: symbol already defined: "SetPlayerTime"
SetPlayerTime(playerid, 0, 0); // Midnight
OnPlayerConnect.
Also i suggest you to look at gl_realtime filterscript, which can be found downloading 0.3.7/0.3DL server package. Or here: https://github.com/Southclaws/samp-H...l_realtime.pwn Which also has weather support. |
public OnPlayerConnect(playerid)
{
SetWorldTime(0);
SetPlayerTime(playerid, 0, 0); // Midnight
TogglePlayerClock(playerid, 1); // Show the clock
Try this
new gHour, gWorldTime; gettime(.hour = gHour); gettime(.hour = gWorldTime); SetWorldTime(gWorldTime); Put the above in OnGameModeInit |
Try this
new gHour, gWorldTime; gettime(.hour = gHour); gettime(.hour = gWorldTime); SetWorldTime(gWorldTime); Put the above in OnGameModeInit |
gettime(hour, minute);
new string[60];
format(string,sizeof string, "* Game Time: %02d:%02d",hour,minute);
SendClientMessage(playerid, -1, string);
pawn Код:
|
...\cnr.pwn(9919) : error 017: undefined symbol "hour"
...\cnr.pwn(9922) : error 017: undefined symbol "hour"
...\cnr.pwn(9926) : error 021: symbol already defined: "string"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
public OnPlayerConnect(playerid)
{
new gHour, gWorldTime;
gettime(.hour = gHour);
gettime(.hour = gWorldTime);
SetWorldTime(gWorldTime);
gettime(hour, minute);
new string[60];
format(string,sizeof string, "* Game Time: %02d:%02d",hour,minute);
SendClientMessage(playerid, -1, string);
TogglePlayerClock(playerid, 1); // Show the clock
new string[256],Query[200];
GetPlayerName(playerid, PlayerInfo[playerid][pName], 128);
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 50);
ResetAllPlayerStats(playerid);
SetPlayerColor(playerid, COLOR_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