PlayerTextDrawSetPreviewModel(playerid, Weapon26[playerid], GetPlayerWeapon(playerid));
PlayerTextDrawShow(playerid, Weapon26[playerid]);
Код:
PlayerTextDrawShow(playerid, Weapon26[playerid]); |
GetModelFromWeapon(weapon) {switch(weapon) {}case 0: return 19475;//invisible model case 1: return 331; case 2: return 333; case 3: return 334; case 4: return 335; case 5: return 336; case 6: return 337; case 7: return 338; case 8: return 339; case 9: return 341; case 10: return 321; case 11: return 322; case 12: return 323; case 13: return 324; case 14: return 325; case 15: return 326; case 16: return 342; case 17: return 343; case 18: return 344; case 22: return 346; case 23: return 347; case 24: return 348; case 25: return 349; case 26: return 350; case 27: return 351; case 28: return 352; case 29: return 353; case 30: return 355; case 31: return 356; case 32: return 372; case 33: return 357; case 34: return 358; case 35: return 359; case 36: return 360; case 37: return 361; case 38: return 362; case 39: return 363; case 40: return 364; case 41: return 365; case 42: return 366; case 43: return 367; case 44: return 368; case 45: return 369; case 46: return 371;} return 0;
PlayerTextDrawSetPreviewModel(playerid, Weapon26[playerid], GetModelFromWeapon(GetPlayerWeapon(playerid))); PlayerTextDrawShow(playerid, Weapon26[playerid]);
PlayerTextDrawSetPreviewModel(playerid, Weapon26[playerid], 331);
stock GetObjectModel(playerid)
{
new
_ObjectModel = 0;
switch( GetPlayerWeapon( playerid ) )
{
case 1: _ObjectModel = 331;
case 2: _ObjectModel = 333;
case 3: _ObjectModel = 334;
case 4: _ObjectModel = 335;
case 5: _ObjectModel = 336;
case 6: _ObjectModel = 337;
case 7: _ObjectModel = 338;
case 8: _ObjectModel = 339;
case 9: _ObjectModel = 341;
case 10: _ObjectModel = 321;
case 11: _ObjectModel = 322;
case 12: _ObjectModel = 323;
case 13: _ObjectModel = 324;
case 14: _ObjectModel = 325;
case 15: _ObjectModel = 326;
case 16: _ObjectModel = 342;
case 17: _ObjectModel = 343;
case 18: _ObjectModel = 344;
case 22: _ObjectModel = 346;
case 23: _ObjectModel = 347;
case 24: _ObjectModel = 348;
case 25: _ObjectModel = 349;
case 26: _ObjectModel = 350;
case 27: _ObjectModel = 351;
case 28: _ObjectModel = 352;
case 29: _ObjectModel = 353;
case 30: _ObjectModel = 354;
case 31: _ObjectModel = 356;
case 32: _ObjectModel = 372;
case 33: _ObjectModel = 357;
case 34: _ObjectModel = 358;
case 35: _ObjectModel = 359;
case 36: _ObjectModel = 360;
case 37: _ObjectModel = 361;
case 38: _ObjectModel = 362;
case 39: _ObjectModel = 363;
case 40: _ObjectModel = 364;
case 41: _ObjectModel = 365;
case 42: _ObjectModel = 366;
case 43: _ObjectModel = 367;
case 44: _ObjectModel = 368;
case 45: _ObjectModel = 369;
case 46: _ObjectModel = 371;
}
return _ObjectModel;
}
public OnPlayerUpdate(playerid)
{
return PlayerTextDrawSetPreviewModel(playerid, Weapon26[playerid], GetObjectModel(playerid));
}