|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Apr 2009
Posts: 139
Reputation: 6
|
Hello guys, im a starting scriptor and im still learning using pawno. Im also tryng to create an easy RP server. Well meanwhile I didnt do much and I got stuck on making the Class Selection script. Meanwhile I made an Easy Skin Selection for Grove Street Families, their background is G Street, but when I wanted to create a spawn for ballas for example near Crack Den, I cant figure out how to script it in pawno, well my question is: How to make skin selection that will spawn different skins in different positions.
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2010
Location: Other side of the Universe.
Posts: 2,086
Reputation: 111
|
|
|
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Apr 2009
Posts: 139
Reputation: 6
|
Well that didnt help me much, but here ill try to make it easier for you guys to take a look on what I made and what should I fix here so it will work, maybe there is supposed to be some operator between them I dont know..
Code:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2527.9763,-1666.6794,15.1682);
SetPlayerFacingAngle(playerid,100.0);
SetPlayerCameraPos(playerid, 2522.4639,-1667.2499,15.0358);
SetPlayerCameraLookAt(playerid, 2527.9763,-1666.6794,15.1682);
GameTextForPlayer(playerid, "~g~Grove Street Families", 500, 3);
return 1;
}
{
SetPlayerPos(playerid, 320.1396,1122.7827,1083.8828);
SetPlayerFacingAngle(playerid,100.0);
SetPlayerCameraPos(playerid, 320.2842,1118.7600,1083.8828);
SetPlayerCameraLookAt(playerid, 320.1396,1122.7827,1083.8828);
GameTextForPlayer(playerid, "~b~Front Yard Ballas", 500, 3);
return 1;
}
|
|
|
|
|
#4 | |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2010
Location: Other side of the Universe.
Posts: 2,086
Reputation: 111
|
Quote:
|
|
|
|
|
|
#5 |
|
Big Clucker
![]() ![]() Join Date: Apr 2009
Posts: 139
Reputation: 6
|
Ok, I just took a look in those tutorials but nothing helped me there, seriously I did read them now.. but there is nothing that looks like my codes, but the point is, if I delete the second code the first script will work. So can you simply explain me whats my mistake here?
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2010
Location: Other side of the Universe.
Posts: 2,086
Reputation: 111
|
pawn Code:
And so on. Something like that. Or use a switch like in the post below this. |
|
|
|
|
#7 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2010
Posts: 1,306
Reputation: 86
|
You should use a switch statement for that.
pawn Code:
|
|
|
|
|
#8 |
|
Big Clucker
![]() ![]() Join Date: Apr 2009
Posts: 139
Reputation: 6
|
like this??
Code:
public OnPlayerRequestClass(playerid, classid)
switch(classid)
{
case 0:
{
SetPlayerPos(playerid, 2527.9763,-1666.6794,15.1682);
SetPlayerFacingAngle(playerid,100.0);
SetPlayerCameraPos(playerid, 2522.4639,-1667.2499,15.0358);
SetPlayerCameraLookAt(playerid, 2527.9763,-1666.6794,15.1682);
GameTextForPlayer(playerid, "~g~Grove Street Families", 500, 3);
{
case 1:
{
SetPlayerPos(playerid, 320.1396,1122.7827,1083.8828);
SetPlayerFacingAngle(playerid,100.0);
SetPlayerCameraPos(playerid, 320.2842,1118.7600,1083.8828);
SetPlayerCameraLookAt(playerid, 320.1396,1122.7827,1083.8828);
GameTextForPlayer(playerid, "~b~Front Yard Ballas", 500, 3);
}
return 1;
}
|
|
|
|
|
#9 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2009
Location: The Netherlands
Posts: 2,824
Reputation: 709
|
I know why. You should open the callback with a bracket
pawn Code:
pawn Code:
I can't help you futher though. I gtg |
|
|
|
|
#10 |
|
Big Clucker
![]() ![]() Join Date: Apr 2009
Posts: 139
Reputation: 6
|
Code:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
SetPlayerPos(playerid, 2527.9763,-1666.6794,15.1682);
SetPlayerFacingAngle(playerid,100.0);
SetPlayerCameraPos(playerid, 2522.4639,-1667.2499,15.0358);
SetPlayerCameraLookAt(playerid, 2527.9763,-1666.6794,15.1682);
GameTextForPlayer(playerid, "~g~Grove Street Families", 500, 3);
{
case 1:
{
SetPlayerPos(playerid, 320.1396,1122.7827,1083.8828);
SetPlayerFacingAngle(playerid,100.0);
SetPlayerCameraPos(playerid, 320.2842,1118.7600,1083.8828);
SetPlayerCameraLookAt(playerid, 320.1396,1122.7827,1083.8828);
GameTextForPlayer(playerid, "~b~Front Yard Ballas", 500, 3);
}
return 1;
}
C:\Documents and Settings\Admin\desktop\RP\gamemodes\CPT.pwn(107) : error 014: invalid statement; not in switch C:\Documents and Settings\Admin\desktop\RP\gamemodes\CPT.pwn(107) : warning 215: expression has no effect C:\Documents and Settings\Admin\desktop\TO RP\gamemodes\CPT.pwn(107) : error 001: expected token: ";", but found ":" C:\Documents and Settings\Admin\desktop\TO RP\gamemodes\CPT.pwn(107) : error 029: invalid expression, assumed zero C:\Documents and Settings\Admin\desktop\TO RP\gamemodes\CPT.pwn(107) : fatal error 107: too many error messages on one line Line 107 is: case 1: |
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [HELP] Class Selection - Showing the class name? | CrucixTM | Scripting Help | 13 | 26/04/2012 06:38 PM |
| Class selection | SampStunta | Help Archive | 4 | 22/09/2010 10:01 PM |
| help me with Class Selection Showing the class name | The_Cobra | Help Archive | 2 | 05/02/2010 05:22 PM |
| Help WIth Class Selection | wilcock33 | Help Archive | 9 | 12/12/2009 11:28 AM |
| [Help] Class Selection | Benne | Help Archive | 1 | 10/11/2009 08:07 PM |