19.05.2011, 12:38
How i can make if player is not login to put him something plase maybe the player to be jail and wjen he login to spawn the player
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
new string[128];
/*
if (gPlayerAccount[playerid] == 0)
{
GameTextForPlayer(playerid, "~w~Welcome.~n~In order to play you need to create an account, type ~n~~r~/regnick (password)~w~ to register", 20000, 3);
SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
return 1;
}
*/
if (gPlayerLogged[playerid] == 0 && gPlayerResponse[playerid] == 0)
{
new plname[MAX_PLAYER_NAME];
new joinintro[256];
GetPlayerName(playerid, plname, sizeof(plname));
if(gPlayerAccount[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, " /login ");
апишете /login вашата парола");
}
else
{
format(joinintro,sizeof(joinintro),"Welcome %s!\n\nContiune to register!", plname);
ShowPlayerDialog(playerid,signupdial,DIALOG_STYLE_INPUT,"Register Plase!",joinintro,"Register","Cancel");
}
}
PlayerInfo[playerid][pModel] = Peds[classid][0];
//printf("pppm = %d classid == %d Peds[classid][0]= %d",PlayerInfo[playerid][pModel],classid,Peds[classid][0]);
if(classid >= 264)
{
format(string, sizeof(string), "~b~SAPD~n~ ~r~Objective~w~: Retain Law");
GameTextForPlayer(playerid,string,3500,6);
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
else if (classid >= 259 && classid <= 263)
{
format(string, sizeof(string), "~g~PARAMEDIC~n~~r~Objective~w~: Save Life");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid >= 1 && classid <= 3)
{
format(string, sizeof(string), "~p~BALLAS~n~~r~Objective~w~: Chaos");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid >= 4 && classid <= 9)
{