31.12.2013, 19:34
Hello guys and happy new year 
When i click on the class i want, im dosent spawning?
Anyone help
Pawn code:
And:
If anyone can help i will be great

When i click on the class i want, im dosent spawning?
Anyone help

Pawn code:
Код:
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
switch( dialogid )
{
case DIALOG_CLASS:
{
switch( listitem )
{
case 0:
{
AddPlayerClass(61,1321.6466,1266.3080,10.8203,1.5767,0,0,0,0,0,0); // spawn
}
case 1:
{
if( GetPlayerScore( playerid ) >= 20 )
{
//comming soon
}
else return ShowPlayerFractionDialog( playerid, false, 20 );
}
case 2:
{
if( GetPlayerScore( playerid ) >= 50 )
{
//comming soon
}
else return ShowPlayerFractionDialog( playerid, false, 50 );
}
case 3:
{
if( GetPlayerScore( playerid ) >= 130 )
{
//comming soon
}
else return ShowPlayerFractionDialog( playerid, false, 130 );
}
case 4:
{
if( GetPlayerScore( playerid ) >= 260 )
{
//comming soon
}
else return ShowPlayerFractionDialog( playerid, false, 260 );
}
}
}
}
return ( 1 );
}
Class_String( )
{
gsString[ 0 ] = EOS;
strcat( gsString, ""G"Pilot\t\t 0\n" );
strcat( gsString, ""G"Taxi\t\t 20\n" );
strcat( gsString, ""G"Helicopter\t 50\n" );
strcat( gsString, ""G"Army\t\t 130\n" );
strcat( gsString, ""G"Police\t\t 260" );
return gsString;
}
stock ShowPlayerFractionDialog( playerid, type, score = 0 )
{
switch( type )
{
case false:
{
format( gsString, sizeof( gsString ), ""R"ERROR: "W"You need "YE"%d "W"score to be able to select this Class.", score );
SendClientMessage( playerid, ~1, gsString );
}
case true: SendClientMessage( playerid, ~1, ""S"INFO: "W"Please select your "YE"Class "W"from the dialog." );
}
return ShowPlayerDialog( playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Class Menu \tScore Required", Class_String( ), "Select", "" );
}
Код:
public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, true);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
}

