}
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pTut] == 0)
{
PlayerInfo[playerid][pConnectTime] = 0;
PlayerInfo[playerid][pBank] = 500;
PlayerInfo[playerid][pFight] = 0;
PlayerInfo[playerid][pTalk] = 0;
PlayerInfo[playerid][pBan] = 0;
RegistrationStep[playerid] = 1;
Wounded[playerid] = 0;
IsUsingAnim[playerid] = 0;
SetPlayerCash(playerid,PlayerInfo[playerid][pCash]);
TogglePlayerControllable(playerid, 0);
TutorialStage[playerid] = 1;
}
if(!gPlayerAnimLibsPreloaded[playerid])
{
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"RIOT");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"OTB");
PreloadAnimLib(playerid,"SWEET");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"HEIST9");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"PED");
PreloadAnimLib(playerid,"GHANDS");
PreloadAnimLib(playerid,"FIGHT_D");
PreloadAnimLib(playerid,"STRIP");
PreloadAnimLib(playerid,"BLOWJOBZ");
PreloadAnimLib(playerid,"BSKTBALL");
PreloadAnimLib(playerid,"BASEBALL");
PreloadAnimLib(playerid,"GRAVEYARD");
PreloadAnimLib(playerid,"FAT");
PreloadAnimLib(playerid,"GANGS");
PreloadAnimLib(playerid,"COLT45");
PreloadAnimLib(playerid,"TEC");
PreloadAnimLib(playerid,"BOX");
PreloadAnimLib(playerid,"SUNBATHE");
PreloadAnimLib(playerid,"CAR");
PreloadAnimLib(playerid,"BD_Fire");
PreloadAnimLib(playerid,"BIKES");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
if(gPlayerLogged[playerid])
{
SetPlayerSpawn(playerid);
SetPlayerHealth(playerid,100);
}
return 1;
stock PreloadAnimLib(playerid, animlib[])
return ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0);
PreloadAnimLib(playerid, "BOMBER");
PreloadAnimLib(playerid, "RAPPING");
PreloadAnimLib(playerid, "SHOP");
PreloadAnimLib(playerid, "BEACH");
PreloadAnimLib(playerid, "SMOKING");
PreloadAnimLib(playerid, "ON_LOOKERS");
PreloadAnimLib(playerid, "DEALER");
PreloadAnimLib(playerid, "CRACK");
PreloadAnimLib(playerid, "CARRY");
PreloadAnimLib(playerid, "COP_AMBIENT");
PreloadAnimLib(playerid, "PARK");
PreloadAnimLib(playerid, "INT_HOUSE");
PreloadAnimLib(playerid, "FOOD");
PreloadAnimLib(playerid, "GANGS");
PreloadAnimLib(playerid, "PED");
PreloadAnimLib(playerid, "FAT");
You say that you spawn in the middle of nowhere? This place isn't a farm? If so, tell me.
|
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gPlayerLogged[i])
{
UpdateScore();
new ping = GetPlayerPing(i);
if (ping > 1050)
{
if (PingCheck[i] == 20)
{ Kick(i); PingCheck[i] = 0; }
if (PingCheck[i] < 20)
PingCheck[i]++;
} if(TutorialStage[i] == 1) {
SetPlayerPos(i, 1460.2792,-975.7952,108.1177);
SetPlayerCameraPos(i, 1460.2792,-975.7952,108.1177); SetPlayerCameraLookAt(i, 1408.4354,-791.1121,84.7171);
ClearScreen(i);
SendClientMessage(i, COLOR_ORANGE, "- Introduction -");
SendClientMessage(i, COLOR_WHITE, "Welcome to the PRototype Gamning SA:MP Server.");
SendClientMessage(i, COLOR_WHITE, "A quick tutorial for all players");
SendClientMessage(i, COLOR_ORANGE, "Forum Website:Comming soon");
TutorialStage[i] = 2;
} else if(TutorialStage[i] == 2) {
SetPlayerPos(i, 1451.6960,-1679.4750,98.8276);
SetPlayerCameraPos(i, 1451.6960,-1679.4750,98.8276); SetPlayerCameraLookAt(i, 1571.5203,-1676.1498,0.1280);
ClearScreen(i);
SendClientMessage(i, COLOR_ORANGE, "Jobs");
SendClientMessage(i, COLOR_WHITE, "Some of the jobs, there are ex. Farmer, Mechanic, Materials Deliver, Detective,");
SendClientMessage(i, COLOR_WHITE, "Trucker, Drug Dealer, Arms Dealer.");
SendClientMessage(i, COLOR_GRAD2, "Now we are heading on to the basic rules and commands.");
TutorialStage[i] = 3;
} else if(TutorialStage[i] == 3) {
gPlayerLogged[i] = 1;
SpawnPlayer(i);
ClearScreen(i);
SendClientMessage(i, COLOR_WHITE, "If you have any questions, use /askq. If anybody are");
SendClientMessage(i, COLOR_WHITE, "breaking the rules simply use /report, and to view the");
SendClientMessage(i, COLOR_WHITE, "To change your spawn to last leaving use /spawn.");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_ORANGE, "- RG:RP Staff.");
TogglePlayerControllable(i, 1);
SetCameraBehindPlayer(i);
SpawnPlayer(i);
SetPlayerSpawn(i);
PlayerInfo[i][pCash] = 500;
SetPlayerCash(i,PlayerInfo[i][pCash]);
PlayerInfo[i][pTut] = 1;
TutorialStage[i] = 0;
SetPlayerPos(i, 1451.6960,-1679.4750,98.8276);
public OnPlayerSpawn(playerid) { if(PlayerInfo[playerid][pTut] == 0) { PlayerInfo[playerid][pConnectTime] = 0; PlayerInfo[playerid][pBank] = 500; PlayerInfo[playerid][pFight] = 0; PlayerInfo[playerid][pTalk] = 0; PlayerInfo[playerid][pBan] = 0; RegistrationStep[playerid] = 1; Wounded[playerid] = 0; IsUsingAnim[playerid] = 0; SetPlayerCash(playerid,PlayerInfo[playerid][pCash]); TogglePlayerControllable(playerid, 0); TutorialStage[playerid] = 1;