Jump to content

[PAWN] Tutorial 5 - Motor- & Lichtsystem


PresidenT AnaS
 Share

Recommended Posts

Hello This day we have work Again for Motor- & Lichtsystem

U must to Follow always my Etapes:

Start with : //Globale Variablen

new dbhandle;

new sInfo[MAX_PLAYERS][playerInfo];
new bInfo[][buildingsEnum] = {
{243.0825,-178.3224,1.5822,285.3642,-41.5576,1001.5156,1,"AMMUN1"},//Ammunation1
{212.1142,-202.1886,1.5781,372.4523,-133.5244,1001.4922,5,"FDPIZA"}//Pizza
 

 

};
new cInfo[50][carEnum];
new ahInfo[][autohausEnum] = {
{125.7242,-170.1469,1.2838,177.7335},//id: 0 1. autohaus
{189.8910,-263.3446,1.2829,180.6895}//id: 1 2. autohaus
};
new ahCars[][autohauscarEnum] = {
{560,118.5637,-153.0834,1.2834,186.6475,50000,0},
{411,106.3420,-158.7720,1.7527,257.3197,80000,0},
{400,204.8894,-265.4756,1.2866,354.1406,10000,1}
};
 
//Farben
#define COLOR_RED 0xFF0000FF
//Dialoge

 

 

 

#define DIALOG_TELEPORT 1
#define DIALOG_REGISTER 2
#define DIALOG_LOGIN 3
#define DIALOG_AUTOHAUS 4

 

 

public OnGameModeInit()
{
SetGameModeText("MrMonat Tutorialmode");
AddPlayerClass(1,199.0846,-150.0331,1.5781,359.1443,WEAPON_MP5,500,0,0,0,0);
AddPlayerClass(2,199.0846,-150.0331,1.5781,359.1443,WEAPON_MP5,500,0,0,0,0);
AddPlayerClass(3,199.0846,-150.0331,1.5781,359.1443,WEAPON_MP5,500,0,0,0,0);
2)DisableInteriorEnterExits();
//Gebäude laden
for(new i=0; i<sizeof(bInfo); i++)
{
CreatePickup(1239,1,bInfo[b_x],bInfo[b_y],bInfo[b_z]);
Create3DTextLabel("Zum Betreten /enter",COLOR_RED,bInfo[b_x],bInfo[b_y],bInfo[b_z],10,0,1);
}
 

 

//Autos erstellen
AddStaticVehicle(560,214.1196,-141.3710,1.3052,1.6804,-1,-1); //Sultan
 
//Autohäuser laden
for(new i=0; i<sizeof(ahCars); i++)
{
ahCars[id_x]=AddStaticVehicle(ahCars[model],ahCars[c_x],ahCars[c_y],ahCars[c_z],ahCars[c_r],-1,-1);
}
 
Last:
for(new i=0; i<sizeof(cInfo); i++)
{
if(cInfo[id_x]==0)continue;
if(cInfo[besitzer]!=sInfo[playerid][db_id])continue;
GetVehiclePos(cInfo[id_x],cInfo[c_x],cInfo[c_y],cInfo[c_z]);
GetVehicleZAngle(cInfo[id_x],cInfo[c_r]);
new query[256];
format(query,sizeof(query),"UPDATE autos SET x='%f',y='%f',z='%f',r='%f' WHERE id='%i'",cInfo[c_x],cInfo[c_y],cInfo[c_z],cInfo[c_r],cInfo[db_id]);
mysql_function_query(dbhandle,query,false,"","");
DestroyVehicle(cInfo[id_x]);
cInfo[id_x]=0;
}
Thanks For your time-Good bye#
Edited by Cdorsu
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.