SA-MP Forums Archive
how to make this? - 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: how to make this? (/showthread.php?tid=334765)



how to make this? - oscar7610 - 15.04.2012

How can I make these teams?


Uploaded with ImageShack.us


Uploaded with ImageShack.us



Uploaded with ImageShack.us


Re: how to make this? - IstuntmanI - 15.04.2012

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;
}



Re: how to make this? - oscar7610 - 15.04.2012

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); //


Re: how to make this? - IstuntmanI - 15.04.2012

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;
}



Re: how to make this? - oscar7610 - 15.04.2012

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)


Re: how to make this? - AndreT - 15.04.2012

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


Re: how to make this? - oscar7610 - 15.04.2012

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); //


Re: how to make this? - oscar7610 - 15.04.2012

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

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


Re: how to make this? - IstuntmanI - 15.04.2012

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;
}