Posts: 69
Threads: 17
Joined: Mar 2014
Okey guys so i got the blank script and i gonna start a basic script i would like to get told how edit like OnPlayerConnect (Playerid) there should be a text and OnPlayerDeath there should be a text could you just tell me that and maybe send me a link how to create bottoms like press YES if you wanna report or NO if you don't want to report.
Posts: 69
Threads: 17
Joined: Mar 2014
And how do i like edit when i got many AddPlayerClass there should be like text when they change to the next character like the name of the character like TIMMY
Grandmother GRANDFATHER Onkel Police Timmy Detective
Posts: 277
Threads: 19
Joined: Sep 2013
Is this what you meant about OnPlayerConnect? (added OnPlayerDisconnect)
pawn Код:
public OnPlayerConnect(playerid)
{
new String[128], Playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, Playername, sizeof(Playername));
format(String, sizeof(String),"%s(%d) Has Joined The Server", Playername, playerid);
SendClientMessageToAll(0xAFAFAFAA, String);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
switch(reason)
{
case 0: format(string, sizeof(string), "%s(%d) Has Left The Server - (Timeout / Crash)", pname, playerid);
case 1: format(string, sizeof(string), "%s(%d) Has Left The Server - (Leaving / Quit)", pname, playerid);
case 2: format(string, sizeof(string), "%s(%d) Has Left The Server - (Kicked / Banned)", pname, playerid);
}
SendClientMessageToAll(0xAFAFAFAA, string);
return 1;
}