Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- new dropbombs = GetPVarInt(playerid,"DroppingBombs");
- new i = GetPVarInt(playerid,"DroppingFrom");
- new Float:droptime = GetPVarFloat(playerid,"DropTime");
- if(dropbombs > 0)
- {
- if(ServerCar[i][v_localid]!=INVALID_VEHICLE_ID)
- {
- // printf("DEBUG: DREI: Spieler %s, dropbombs: %d, droptime: %f, gettime: %d Fahrzeug: %i",GetName(playerid),dropbombs, droptime, gettime(),i);
- DropBomb(playerid,0);
- droptime = gettime()+1;
- SetPVarFloat(playerid,"DropTime",droptime);
- }
- }
- if (g_FlyMode[playerid][flyType] == 1 && PlayerInfo[playerid][IsConfiguringArtillery])
- {
- new
- Float:fPX, Float:fPY, Float:fPZ,
- Float:fVX, Float:fVY, Float:fVZ,
- Float:object_x, Float:object_y, Float:object_z;
- const
- Float:fScale = 35.0;
- GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
- GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
- object_x = fPX + floatmul(fVX, fScale);
- object_y = fPY + floatmul(fVY, fScale);
- object_z = fPZ + floatmul(fVZ, fScale);
- SetPlayerCheckpoint(playerid,object_x, object_y, object_z,8.0);
- PlayerInfo[playerid][pTargetArtPos_X] = object_x;
- PlayerInfo[playerid][pTargetArtPos_Y] = object_y;
- PlayerInfo[playerid][pTargetArtPos_Z] = object_z;
- ShowPlayerBox(playerid,"Press ENTER to select a positon.",-1);
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- new string[16];
- format(string,sizeof(string),"%d kmp/h",GetPlayerSpeed(playerid));
- PlayerTextDrawSetString(playerid,kmphForPlayer[playerid],string);
- }
- new iCurWeap = GetPlayerWeapon(playerid);
- if(iCurWeap != GetPVarInt(playerid, "iCurrentWeapon"))
- {
- OnPlayerChangeWeapon(playerid, GetPVarInt(playerid, "iCurrentWeapon"), iCurWeap);
- SetPVarInt(playerid, "iCurrentWeapon", iCurWeap);//Update the weapon variable
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement