06.02.2016, 16:07
Код:
if(PRESSED(KEY_ANALOG_LEFT)) { if(playerType[playerid] == 2) { if(scares[playerid] != 0) { new Float:pz, Float:x, Float:y, Float:z; GetPlayerFacingAngle(playerid, pz); GetPlayerPos(playerid, Float:x, Float:y, Float:z); scares[playerid]--; GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0); CreateObject(1437,Float:x,Float:y,Float:z,-30.0,0.0,pz,500.0); SendMes(playerid,-1,"{B9BCBD}Now,you have(%d) {B9BCBD}ladders",scares[playerid]); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); } } } GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a); if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); }
server send me text with now,you have %d ladders
but ladder-object not appear in game, not created..
how to fix?