#1

1.How to have character at select class

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

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
Reply
#3

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;
}
Reply
#4

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);
Reply
#5

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.
Reply
#6

Still don't see
Reply
#7

where did u add the playerclass?
Reply
#8

Make sure AddPlayerClass is under OnGameModeInit.
Reply
#9

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.
Reply
#10

i sure
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)