27.01.2010, 19:59
Now i write here code:
Top of Script
OnPlayerConnect
OnPlayerDisconnect
Error output
That is OnPlayerConnect and OnPlayerDisconnect
Top of Script
Code:
new PlayersOnline[MAX_PLAYERS];
Code:
PlayersOnline = ++; new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s has joined the server! Online Players: %d", pname, PlayersOnline); SendClientMessageToAll(0xAAAAAAAA, string);
Code:
PlayersOnline = --; new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME]; 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);
Code:
C:\Program Files\SAMP\gamemodes\erp.pwn(129) : error 029: invalid expression, assumed zero C:\Program Files\SAMP\gamemodes\erp.pwn(129 -- 131) : error 022: must be lvalue (non-constant) C:\Program Files\SAMP\gamemodes\erp.pwn(144) : error 029: invalid expression, assumed zero C:\Program Files\SAMP\gamemodes\erp.pwn(144 -- 146) : error 022: must be lvalue (non-constant) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.