05.06.2013, 01:35
Quote:
Alo!, quй onda tanto tiempo :P luego de mis vacaciones en samp volvн a fastidiarlos otra vez
pues tengo un problema con estй cуdigo Код:
error 017: undefined symbol "GetXYInfrontOfPlayer" error 017: undefined symbol "SPRINT_KEY" Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a); x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); } Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & SPRINT_KEY) { if(IsPlayerInAnyVehicle(playerid)) if(!IsValidObject(Rampa[playerid])) { new Float:x, Float:y, Float:z, Float:a; GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); GetVehicleZAngle(GetPlayerVehicleID(playerid), a); GetXYInfrontOfPlayer(playerid, x, y, 10.0); Rampa[playerid] = CreateObject(1655, x, y, z, 0.0, 0.0, a); SetTimerEx("QuitarRampa", 4*1000, false, "i", playerid); } } return 1; } |