10.01.2014, 14:56
Hi,
Thanks for your answers.
But, mate, I'm not entirely sure I understand what you mean. I mean, I'm looking at the "public OnPlayerConnect" and I don't seem to find anything where it says that the player will spawn on a specific place. So I'm not sure where I should put the SetPlayerPos, could someone please help me out? This is the public OnPlayerConnect script once again.
And the following code will be where I want my character to spawn, as soon as he registers. If, and when, you help me out could you please refrain from just giving me a complete code? I'd like to learn this, so I don't constantly have to come begging for help. And if you do give me a complete code, could you please explain to me what you did?
Cheers!
Thanks for your answers.
But, mate, I'm not entirely sure I understand what you mean. I mean, I'm looking at the "public OnPlayerConnect" and I don't seem to find anything where it says that the player will spawn on a specific place. So I'm not sure where I should put the SetPlayerPos, could someone please help me out? This is the public OnPlayerConnect script once again.
Код:
public OnPlayerConnect(playerid) { new name[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); SetPlayerCameraPos(playerid, 1061.1375, -1348.5317, 72.5953); SetPlayerCameraLookAt(playerid, 1062.0928, -1348.8217, 72.5754); if(IsPlayerNPC(playerid)) return 1; /* IF PLAYER HAS NON-RP NAME CHECKER */ new str[24+MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); if(strfind(name, "0", true) != -1 || strfind(name, "1", true) != -1 || strfind(name, "2", true) != -1 || strfind(name, "3", true) != -1 || strfind(name, "4", true) != -1 || strfind(name, "5", true) != -1 || strfind(name, "6", true) != -1 || strfind(name, "7", true) != -1 || strfind(name, "8", true) != -1 || strfind(name, "9", true) != -1 || strfind(name, "[", true) != -1 || strfind(name, "]", true) != -1) { SendClientMessage(playerid, COLOR_RED, "SERVER: {FFFFFF}Here in La Ville De L'Isle Roleplay we require our players to use a proper roleplay name, such as John_Red."); SendClientMessage(playerid, COLOR_RED, "SERVER: {FFFFFF}Nor do allow our players to use numbers in their names, therefore we at La Ville De L'Isle would like to politely ask you to remove the numbers, in case you have any."); GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "%s has been kicked from the server for having a Non-RP name.", name); SendClientMessageToAll(0xC4C4C4FF, str); Kick(playerid); } if(strfind( name, "_", true) == -1) { SendClientMessage(playerid, COLOR_RED, "SERVER: {FFFFFF}Here in La Ville De L'Isle Roleplay we require our players to use a proper roleplay name, such as John_Red."); format(str, sizeof(str), "%s has been kicked from the server for having a Non-RP name.", name); SendClientMessageToAll(0xC4C4C4FF, str); Kick(playerid); } /* END OF THE NON-RP NAME CHECKER */ if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Authentication","{FFFFFF}Welcome to {FF0000}La Ville De L'Isle Roleplay\n{FFFFFF}Please type your password to proceed with your login.","Login","Quit"); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Authentication","{FFFFFF}Welcome to {FF0000}La Ville De L'Isle Roleplay\n{FFFFFF}Please type your password to proceed with your register.","Register","Quit"); } return 1; }
Код:
SetPlayerPos(playerid, 942, -4630, 42);