SA-MP Forums Archive
Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (/showthread.php?tid=422931)



Help - Doll - 16.03.2013

1.How to have character at select class

2.And how to change forms walk and run(Space)



Re: Help - rangerxxll - 16.03.2013

To change the run in the game mode, you'll want to add this under OnGameModeInit.
pawn Код:
UsePlayerPedAnims();
And to add a skin to the selection menu, you'll want to read up on this wiki article. https://sampwiki.blast.hk/wiki/AddPlayerClass


Re: Help - [CG]Milito - 16.03.2013

Those "Characters" are named GameTexts,

use this function

pawn Код:
GameTextForPlayer
,

An example would be, using OnPlayerConnect callback

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[90];
    format(string,sizeof(string),"~b~Welcome to my server!");
    GameTextForPlayer(playerid, string, 3000, 3);
    return 1;
}



Re: Help - Doll - 16.03.2013

i has add but don't see
Код:
      AddPlayerClass(93,1132.8715,-2036.8917,69.0078,270.5003,27,600,31,700,29,1000); //
	AddPlayerClass(294,1132.8715,-2036.8917,69.0078,270.5003,27,600,31,700,29,1000); //
	AddPlayerClass(295,1132.8715,-2036.8917,69.0078,270.5003,27,600,31,700,29,1000); //
	AddPlayerClass(120,1132.8715,-2036.8917,69.0078,270.5003,27,600,31,700,29,1000); //
	AddPlayerClass(208,1132.8715,-2036.8917,69.0078,270.5003,27,600,31,700,29,1000); //
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1132.8715,-2036.8917,69.0078);
	SetPlayerFacingAngle(playerid,90.0);
	SetPlayerCameraPos(playerid, 1132.8715,-2036.8917,69.0078);
	SetPlayerCameraLookAt(playerid, 1132.8715,-2036.8917,69.0078);
	return 1;
}
Код:
public OnPlayerConnect(playerid)
{
    GameTextForPlayer(playerid,"~r~Hello!",10000,6);
	new name[MAX_PLAYER_NAME], str[80];
	GetPlayerName(playerid,name,sizeof(name));
	format(str, sizeof(str), "%s has connected to Alpha-X!", name);
    SendClientMessageToAll(COLOR_AQUA, str);



Re: Help - JaKe Elite - 16.03.2013

Do you mean a text when selecting a class?

it might be something like this OnPlayerRequestClass

pawn Код:
switch(classid)
{
    case 0: GameTextForPlayer(playerid, "~w~Class 0", 1000, 3);
}
Switching classid is easier than if.
Case 0 is the first class

Example you add only AddPlayerClass skin id 299.
299 will be classid 0.


Re: Help - Doll - 16.03.2013

Still don't see


Re: Help - P3DRO - 16.03.2013

where did u add the playerclass?


Re: Help - rangerxxll - 16.03.2013

Make sure AddPlayerClass is under OnGameModeInit.


Re: Help - Alvord - 16.03.2013

And make sure that the coordinates(x, y, z) you're putting in AddPlayerClass is the place where the player is currently set to look upon connection.


Re: Help - Doll - 16.03.2013

i sure