Просмотр полной версии : [Вопрос] Записать данные на кнопку Spawn
А как на кнопку Spawn записать выбранный ид в переменную?
http://storage3.static.itmages.ru/i/16/0227/s_1456603689_2688101_006e8b621f.png (http://itmages.ru/image/view/3935400/006e8b62)
public OnPlayerRequestSpawn(playerid)
{
new skinid = GetPlayerSkin(playerid);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
new skinid = GetPlayerSkin(playerid);
return 1;
}
Спасибо. Но я чуть по другому сделал.
Показал бы, как ты это сделал.
vovandolg
28.02.2016, 15:51
Скорее всего вот так)
public OnPlayerRequestClass(playerid, classid)
{
SetPVarInt(playerid,"UseRequestClass",1);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "UseRequestClass"))
{
new playerskin = GetPlayerSkin(playerid);
DeletePVar(playerid, "UseRequestClass");
}
return 1;
}
Kurbanoff
28.02.2016, 22:25
Скорее всего вот так)
public OnPlayerRequestClass(playerid, classid)
{
SetPVarInt(playerid,"UseRequestClass",1);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "UseRequestClass"))
{
new playerskin = GetPlayerSkin(playerid);
DeletePVar(playerid, "UseRequestClass");
}
return 1;
}
Ванга уровень: over999...
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. Перевод: zCarot