SA-MP Forums Archive
Problem with Player Class - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with Player Class (/showthread.php?tid=107806)



Problem with Player Class - unique1801 - 11.11.2009


Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(299, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(33, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(181, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(22, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

i use this for [player spawn

but when i connect the server
i dont see any player

it says <, > , spawn thats it!!

no player seenn

thanxxx



Re: Problem with Player Class - Jeffry - 11.11.2009

Okay what you did so far is right.

But now: add this at :
OnPlayerRequestClass

then it looks like this:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746,);
    SetPlayerCameraPos(playerid, 1962.3783, 1347.1572, 15.3746,);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746,);
    return 1;
}
Now Compile and save. Go in your server and try. I hope it works. Any other questions?

Hope i helped.
Greetz, Jeffry


Re: Problem with Player Class - unique1801 - 12.11.2009

lol i already did this !!

doesnt work




Re: Problem with Player Class - Peter_Corneile - 12.11.2009

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    return 1;
}
Try this


Re: Problem with Player Class - unique1801 - 12.11.2009

tried this but didnt work! i think u didnt get me

here is a screenshot!!

when i connect the server i see no player .. only left , right (arrows) and spawn

i added 5-6 players




Re: Problem with Player Class - Peter_Corneile - 12.11.2009

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch (classid) {
    case 0:
    {
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    }
    case 1:
    {
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    }
    case 2:
    {
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    }    
    case 3:
    {
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    }  
    case 4:
    {
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    }
    case 5:
    {
    SetPlayerPos(playerid,369.8589,-2018.7784,7.6719);
    SetPlayerCameraPos(playerid, 19369.6948,-2012.0762,7.9719);
    SetPlayerCameraLookAt(playerid, 369.8589,-2018.7784,7.6719);
    }
    }
    return 1;
}
Edited code


Re: Problem with Player Class - unique1801 - 12.11.2009

well i got these errors

C:\Documents and Settings\Nishant\Desktop\SErver\gamemodes\Silverli te.pwn(4 : error 014: invalid statement; not in switch
C:\Documents and Settings\Nishant\Desktop\SErver\gamemodes\Silverli te.pwn(4 : warning 215: expression has no effect
C:\Documents and Settings\Nishant\Desktop\SErver\gamemodes\Silverli te.pwn(4 : error 001: expected token: ";", but found ":"
C:\Documents and Settings\Nishant\Desktop\SErver\gamemodes\Silverli te.pwn(4 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Nishant\Desktop\SErver\gamemodes\Silverli te.pwn(4 : fatal error 107: too many error messages on one line



Re: Problem with Player Class - Peter_Corneile - 12.11.2009

Error line ?


Re: Problem with Player Class - Peter_Corneile - 12.11.2009

Post updated


Re: Problem with Player Class - unique1801 - 12.11.2009

i compiled it
but still i cant see any players ~ dono why