14.02.2011, 12:14
hello, I have big and old problem with newbies spawn :/ ok, so I created guide for newb, and all spawn - FUCKED UP. >.>
When I say answers to questions - my spawn isn't at first spawn, server spawns me at lv(new.pwn spawn)
Script:
OnPlayerText:
So, if I say 'Nenoriu' for guide server spawns me at lv, not at saved pos in float...
When I say answers to questions - my spawn isn't at first spawn, server spawns me at lv(new.pwn spawn)
Script:
pawn Код:
if( GetPVarInt( playerid, "Naujokas" ) == 1 ) // is player newbie?
{
new
Random = random( sizeof( NaujokoSpawn ) )
;
SetPlayerPos( playerid, NaujokoSpawn[ Random ][ 0 ], NaujokoSpawn[ Random ][ 1 ], NaujokoSpawn[ Random ][ 2 ] );
new
Stringas[ 120 ]
;
format( Stringas, 120, ""#h_Balta"[ > ] "#h_Orandzine"Sveiki %s, "#h_Geltona"Jыs esate "#h_Zalia"Naujokas.", ZaidejoVardas( playerid ) );
SendClientMessage( playerid, -1, Stringas );
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Taigi, "#h_Zalia"pirmas klausimas... "#h_Orandzine"Jыs esate: "#h_Raudona"Vyras/Moteris" );
SetPVarInt( playerid, "Registracija", 1 );
TogglePlayerControllable( playerid, false );
new
Float: Pozicija[ 3 ]
;
GetPlayerPos( playerid, Pozicija[ 0 ], Pozicija[ 1 ], Pozicija[ 2 ] );
SetPVarFloat( playerid, "sX", Pozicija[ 0 ] );
SetPVarFloat( playerid, "sY", Pozicija[ 1 ] );
SetPVarFloat( playerid, "sZ", Pozicija[ 2 ] );
SetPlayerCameraPos( playerid, 112.117, 1206.288, 30.941 );
SetPlayerCameraLookAt( playerid, 89.666, 1204.780, 19.051 );
SetPlayerPos( playerid, 91.5326, 1180.1729, 18.6641 );
SetPVarInt( playerid, "Naujokas", 0 );
SetPlayerScore( playerid, 550 );
}
pawn Код:
if( GetPVarInt( playerid, "Registracija" ) == 2 )
{
if( !strcmp( text, "Noriu", true ) )
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Jыs sutikote apюлti "#h_Zalia"apmokymus." );
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Uю tai gaunate 100patirties taрkш, bei 1500$." );
SetPVarInt( playerid, "Registracija", 3 );
SetPlayerVirtualWorld( playerid, random( 1000 ) );
Apmokymai = SetTimerEx( "ZaidejoApmokymai", 10000, true, "d", playerid );
return 0;
}
else if( !strcmp( text, "Nenoriu", true ) )
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Jыs nesutikote apюлti serverio "#h_Zalia"apmokymш" );
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Zalia"Sлkmлs юaidime "#h_Geltona"linki "#h_Salotine"FG Administracija." );
SetPVarInt( playerid, "Registracija", 0 );
TogglePlayerControllable( playerid, true );
SetPlayerPos( playerid, GetPVarFloat( playerid, "sX" ), GetPVarFloat( playerid, "sY" ), GetPVarFloat( playerid, "sZ" ) );
SetCameraBehindPlayer( playerid );
return 0;
}
else
{
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Ar norite apюлti serverio "#h_Zalia"apmokymus? "#h_Raudona"[Noriu/Nenoriu]" );
return 0;
}
}
if( GetPVarInt( playerid, "Registracija" ) == 1 )
{
new
Stringas[ 439 ]
;
if( !strcmp( text, "Vyras", true ) )
{
SetPVarInt( playerid, "Lytis", 1 );
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Gerai, Jыs esate "#h_Zalia"Vyras." );
strcat( Stringas, ""#h_Zalia"1. "#h_Geltona"Gerbti kitus юaidлjus taip, kaip gerbiate Save.\n"#h_Zalia"2. "#h_Geltona"Laikytis KET taisykliш.\n"#h_Zalia"3. "#h_Geltona"Iр Administracijos nepraрinлtш pinigш, ir panaрiш dalykш.\n"#h_Zalia"4. "#h_Geltona"Radus klaidа jа praneрti, jokiu bыdu neiрnaudoti.\n"#h_Zalia"5. "#h_Geltona"Nenaudotis иytш, ir panaрiш modifikacijш, kurios palengvina юaidimа.\n"#h_Zalia"6. "#h_Geltona"Kai vyksta eventas, jo netrugdyti.", 439 );
ShowPlayerDialog( playerid, 5, DIALOG_STYLE_MSGBOX, "Taisyklлs.", Stringas, "Sutinku", "Nesutinku" );
new
Random = random( sizeof( VyruSkin ) )
;
SetPlayerSkin( playerid, VyruSkin[ Random ] );
SetPVarInt( playerid, "Drabuziai", GetPlayerSkin( playerid ) );
return 0;
}
else if( !strcmp( text, "Moteris", true ) )
{
SetPVarInt( playerid, "Lytis", 2 );
SendClientMessage( playerid, -1, ""#h_Balta"[ > ] "#h_Geltona"Gerai, Jыs esate "#h_Zalia"Moteris." );
strcat( Stringas, ""#h_Zalia"1. "#h_Geltona"Gerbti kitus юaidлjus taip, kaip gerbiate Save.\n"#h_Zalia"2. "#h_Geltona"Laikytis KET taisykliш.\n"#h_Zalia"3. "#h_Geltona"Iр Administracijos nepraрinлtш pinigш, ir panaрiш dalykш.\n"#h_Zalia"4. "#h_Geltona"Radus klaidа jа praneрti, jokiu bыdu neiрnaudoti.\n"#h_Zalia"5. "#h_Geltona"Nenaudotis иytш, ir panaрiш modifikacijш, kurios palengvina юaidimа.\n"#h_Zalia"6. "#h_Geltona"Kai vyksta eventas, jo netrugdyti.", 439 );
ShowPlayerDialog( playerid, 5, DIALOG_STYLE_MSGBOX, "Taisyklлs.", Stringas, "Sutinku", "Nesutinku" );
new
Random = random( sizeof( MerginuSkin ) )
;
SetPlayerSkin( playerid, MerginuSkin[ Random ] );
SetPVarInt( playerid, "Drabuziai", GetPlayerSkin( playerid ) );
return 0;
}
else
{
SendClientMessage( playerid, -1, ""#h_Zalia"Jыsш "#h_Geltona"lytis yra: "#h_Raudona"[Vyras/Moteris]" );
return 0;
}
}