how to make this?
#1

How can I make these teams?


Uploaded with ImageShack.us


Uploaded with ImageShack.us



Uploaded with ImageShack.us
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerRequestClass

At OnGameModeInit you have some AddPlayerClass( ... );, the first is classid 0, next is 1, next is 2, and so on.

Example, let's say that at first class you have ballas:
Код:
public OnPlayerRequestClass( playerid, classid )
{
    switch( classid )
    {
        case 0: GameTextForPlayer( "~p~Ballas", ... );
        // case 1: ...
        // case 2: ...
    }
    return 1;
}
Reply
#3

I only have these at ongamemode

AddPlayerClass(126,2022.4338,1008.1268,10.8203,266 .7163,24,75,31,150,4,1); //
AddPlayerClass(127,2022.7472,1005.6512,10.8203,266 .7163,27,75,24,75,4,1); //
Reply
#4

So you have only classid 0 and 1, first class (0) is skin ID 126, and second class (1) is skin 127.

Код:
public OnPlayerRequestClass( playerid, classid )
{
    switch( classid )
    {
        case 0: GameTextForPlayer( "~p~Skin 126 team", ... );
        case 1: GameTextForPlayer( "~p~Skin 127 team", ... );
    }
    return 1;
}
Reply
#5

C:\Users\Oscar\Desktop\*\Gangwarz\gamemodes\bare.p wn(310) : error 035: argument type mismatch (argument 1)
C:\Users\Oscar\Desktop\*\Gangwarz\gamemodes\bare.p wn(311) : error 035: argument type mismatch (argument 1)
Reply
#6

Before anything, I suggest you have a look around the SA-MP wiki. When you find it a little too complex to understand, try attending school for a few more years :P or just learn from other working scripts!

Here's an article that you might find interesting: https://sampwiki.blast.hk/wiki/PAWN_tutorial

I hope you did not literally write ... after "~p~Skin 126 team", because GameTextForPlayer takes other parameters than that. https://sampwiki.blast.hk/wiki/GameTextForPlayer
Reply
#7

someone make this pls

public OnPlayerRequestClass(playerid, classid)
{

SetPlayerPos(playerid, 2026.6274,1007.9417,10.8203);
SetPlayerFacingAngle(playerid,270.0);
SetPlayerCameraPos(playerid, 2035.4634,1008.0040,10.8203);
SetPlayerCameraLookAt(playerid, 2026.6274,1007.9417,10.8203);
return 1;
}


OnGameModeInit
AddPlayerClass(126,2022.4338,1008.1268,10.8203,266 .7163,24,75,31,150,4,1); //
AddPlayerClass(127,2022.7472,1005.6512,10.8203,266 .7163,27,75,24,75,4,1); //
Reply
#8

I will +rep please I want does text when choosing a class.

Can someone give me an example that will work without compiling errors?>
Reply
#9

1. You double-posted, this is prohibited.
2.
Код:
public OnPlayerRequestClass(playerid, classid)
{
	switch( classid )
	{
		case 0: GameTextForPlayer(playerid, "~p~Skin 126 team", 3000, 4);
		case 1: GameTextForPlayer(playerid, "~y~Skin 127 team", 3000, 4);
	}
	SetPlayerPos(playerid, 2026.6274,1007.9417,10.8203);
	SetPlayerFacingAngle(playerid,270.0);
	SetPlayerCameraPos(playerid, 2035.4634,1008.0040,10.8203);
	SetPlayerCameraLookAt(playerid, 2026.6274,1007.9417,10.8203);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)