Posts: 132
Threads: 52
Joined: Mar 2009
O.k i want everyone to know who signed in into my server so for example:
will_92 has joined
Bravo has joined the server
....
Someting like that and that shows on the chat box or like somewhere where you can see?? and also if they like log out. such as
will_92 has Left
Bravo has left the server
,,,
you get what i am saying right ??
what would be the script forthat
Posts: 101
Threads: 20
Joined: May 2009
Reputation:
0
person joining
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server.", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
person leaving
public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME], string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pName);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pName);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pName);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
Posts: 132
Threads: 52
Joined: Mar 2009
Not working
C:\Documents and Settings\Owner\Desktop\SAMP\pawno\include\utils.in c(1) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(76) : error 001: expected token: ";", but found "forward"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(234 ) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(304 ) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(305 ) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(311 ) : error 021: symbol already defined: "SetWeather"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(314 ) : error 021: symbol already defined: "GetPlayerName"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(316 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(320 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(322 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(329 ) : error 021: symbol already defined: "GetPlayerName"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(333 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(344 ) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(349 ) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(349 ) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(353 ) : error 001: expected token: "{", but found "case"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(357 ) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(357 ) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\SAMP\gamemodes\SGGW.pwn(358 ) : error 079: inconsistent return types (array & non-array)
Posts: 101
Threads: 20
Joined: May 2009
Reputation:
0
erase ur whole section of
OnPlayerConnect and add this
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server.", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
and do same in OnPlayerDissconnect
public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME], string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pName);
case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pName);
case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pName);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
u a beginer scirpter?
Posts: 132
Threads: 52
Joined: Mar 2009
still not working.....
are you sure that script wrk ,, because it's not working on mine , maybe if you told me the instruction more clearly i'd maybe b wron g WHO KNOWs
Posts: 132
Threads: 52
Joined: Mar 2009
sure .,,, and also do you know how to make like vans a checkpoint for players to go and if they get it they win and the gamemode restards?
Posts: 673
Threads: 169
Joined: Apr 2008
Reputation:
0
( i aint read any another post except his first )
But search! theres a tutorial on how to do this at wiki.sa-mp.com