My script doesn't work
#1

I based my script off of rivershell(copied a few bits from it), but it fails. Could someone please have a look and tell my why it's not working?
http://pastebin.com/0HhUSPb3

I have no idea what's gone wrong. It compiles fine, but when you join the game you get set to the criminals team regardless of what class you choose. It's also not sending the gametexts properly, nor is it setting your color.
Reply
#2

The classid is not linking to a skinid, it's for the number of classes you create.

Код:
	AddPlayerClass(29,1930.8324,740.1257,10.8203,179.3071,0,0,0,0,0,0); // crims_spawn1
	AddPlayerClass(0,1930.8324,740.1257,10.8203,179.3071,0,0,0,0,0,0); // crims_spawn1
	AddPlayerClass(179,1930.8324,740.1257,10.8203,179.3071,0,0,0,0,0,0); // crims_spawn1
	AddPlayerClass(124,1930.8324,740.1257,10.8203,179.3071,0,0,0,0,0,0); // crims_spawn1

	for (id = 280; id <= 288; id++)
	{
		AddPlayerClass(id,340.0815,2026.1152,22.6406,99.1120,0,0,0,0,0,0); // cops_spawn
	}
Код:
public SetPlayerTeamFromClass(playerid,classid)
{
	// Set their team number based on the class they selected.
	if(classid ==280 || classid == 281 || classid == 282 || classid == 283 || classid == 284 || classid == 285 || classid == 286 || classid == 287 || classid == 288)
The above should be:
Код:
public SetPlayerTeamFromClass(playerid,classid)
{
	// Set their team number based on the class they selected.
	if(classid ==0 || classid == 1|| classid == 2|| classid == 2)
I dunno what class id is for what, but you should be able to work it out now. Don't use skin id.

Reply
#3

I see, that makes much more sense. I'll try it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)