AbramZeMaus
Ученик
1 раз беру пикап -Устариваюсь.2 раз беру опят такие -Устраиваюсь/таким образом немогу закончить работу в чем проблема?
PHP:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == PickJob)
{
switch(GetPVarInt(playerid, "Job"))
{
case 0:
{
SetPVarInt(playerid, "Old_Skin", GetPlayerSkin(playerid));
SetPVarInt(playerid, "Cash", 0);
SetPVarInt(playerid, "Checkpoint", 0);
SetPVarInt(playerid, "JobCar", 0);
SetPlayerSkin(playerid, 27);
SendClientMessage(playerid, 0x2CCD3AFF, "Рабочая смена началась. Возьми свободный погрузчик.");
}
case 1:
{
SendClientMessage(playerid, 0x2CCD3AFF, "Рабочая смена окончена.");
SetPlayerSkin(playerid, GetPVarInt(playerid, "Old_Skin"));
GivePlayerMoney(playerid, GetPVarInt(playerid, "Cash"));
new str[32];
format(str, sizeof(str), "~g~Zarplata~n~~w~$%d", GetPVarInt(playerid, "Cash"));
GameTextForPlayer(playerid, str, 3000, 6);
DeletePVar(playerid, "Cash");
DeletePVar(playerid, "Checkpoint");
}
}
