13.04.2012, 02:12
Alright, so I am currently scripting a tutorial for my gamemode, and it is not working, it should be, but it just is not, I do not quite understand it... Here is the script:
Everything above the First tutorial piece is fine, so it is nothing with them.
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, -83.2991,1124.3035,19.7422);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponPistol], PlayerInfo[playerid][pWeaponPistolAmmo]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponShotgun], PlayerInfo[playerid][pWeaponShotgunAmmo]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponSMG], PlayerInfo[playerid][pWeaponSMGAmmo]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponAssault], PlayerInfo[playerid][pWeaponAssaultAmmo]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponThrown], PlayerInfo[playerid][pWeaponThrownAmmo]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponCombat], 1);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeaponSpray], PlayerInfo[playerid][pWeaponSprayAmmo]);
if(PlayerInfo[playerid][Tutorial] = 0)
{
TogglePlayerControllable(playerid, 0);
if(PlayerInfo[playerid][pOrigin] = 1)
{
SetPlayerCameraPos(playerid, -91.7157,1111.8914,24.0230);
SetPlayerCameraLookAt(playerid, 79.3526,1131.7236,19.7422);
SendClientMessage(playerid, 0xFF0000FF, "|__________________________________|Origin Refuges|__________________________________|");
SendClientMessage(playerid, 0xFF0000FF, "Each origin, (American, European, Asian, German, Taliban, Other) has their own");
SendClientMessage(playerid, 0xFF0000FF, "Refuge, or place for their civilians. Their armies can restock here, help people, etc.");
SendClientMessage(playerid, 0xFF0000FF, "They cannot attack you. You are almost always safe in your origin's refuges being");
SendClientMessage(playerid, 0xFF0000FF, "Administrators are the only people that can grant attacks on other origin's refuges.");
SendClientMessage(playerid, 0xFF0000FF, "Around the refuges, you can usually buy and find goods for surival via /search!");
SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
SetTimer("TutorialTimer1", 30000, false);
}
}
return 1;
}