8000 Missions was Debug ( i dont was it) · GRGServer/SAMP@6323fff · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Missions was Debug ( i dont was it)
Browse files Browse the repository at this point in the history
Order Vehicle was Make Finished ( have bug)
Service was ReChange CreateJob
SetSell was make Finished 
Add Dot´s on SpeedCam
  • Loading branch information
AeroxToby committed Apr 30, 2013
1 parent e1ea1fa commit 6323fff
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 25 deletions.
10 changes: 2 additions & 8 deletions includes/grgserver/Dialogs/D_Missions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,8 @@ DialogResponse:Missions(playerID, response, listItem, inputText[])

if (IsStr(type, "GetOrderedVehicle"))
{
new modelID;
Foreach(arrayIndex, missionData)
{
if (IsStr(missionData[arrayIndex][0], "modelId"))
{
modelID = strval(missionData[arrayIndex][1]);
}
}
new modelID = MySQLQuery("SELECT `data` FROM `missions`");
mysql_store_result();
if (modelID >= 400 && modelID <= 611)
{
printf("Create vehicle %d", modelID);
Expand Down
2 changes: 1 addition & 1 deletion includes/grgserver/Dialogs/D_OrderVehicle.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DialogResponse:OrderVehicle(playerID, response, listItem, inputText[])
new modelID = strval(GetMySQLValue("vehiclemodels", "id", "name", inputText));
if (modelID)
{
new missionID = CreateJob(playerID, JOB_VEHICLEDEALER);
new missionID = CreateJob(playerID, JOB_TRUCKER, modelID);
if (missionID)
{
AddJobData(missionID, "Type", "GetOrderedVehicle");
Expand Down
12 changes: 8 additions & 4 deletions includes/grgserver/Dialogs/D_Service.inc
10000
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ DialogResponse:Service(playerID, response, listItem, inputText[])
{
case 0:
{
new modelID;
SendClientMessageEx(playerID, COLOR_INFO, StringID:578("Your request has been sent"));
new missionID = CreateJob(playerID, JOB_POLICE);
new missionID = CreateJob(playerID, JOB_POLICE, modelID);
if (missionID)
{
AddJobData(missionID, "Type", "GetOrderPolice");
Expand All @@ -27,7 +28,8 @@ DialogResponse:Service(playerID, response, listItem, inputText[])
case 1:
{
SendClientMessageEx(playerID, COLOR_INFO, StringID:578("Your request has been sent"));
new missionID = CreateJob(playerID, JOB_ADAC);
new modelID;
new missionID = CreateJob(playerID, JOB_ADAC, modelID);
if (missionID)
{
AddJobData(missionID, "Type", "GetOrderADAC");
Expand All @@ -37,7 +39,8 @@ DialogResponse:Service(playerID, response, listItem, inputText[])
case 2:
{
SendClientMessageEx(playerID, COLOR_INFO, StringID:578("Your request has been sent"));
new missionID = CreateJob(playerID, JOB_TAXI);
new modelID;
new missionID = CreateJob(playerID, JOB_TAXI, modelID);
if (missionID)
{
AddJobData(missionID, "Type", "GetOrderTaxi");
Expand All @@ -47,7 +50,8 @@ DialogResponse:Service(playerID, response, listItem, inputText[])
case 3:
{
SendClientMessageEx(playerID, COLOR_INFO, StringID:578("Your request has been sent"));
new missionID = CreateJob(playerID, JOB_PARAMEDIC);
new modelID;
new missionID = CreateJob(playerID, JOB_PARAMEDIC, modelID);
if (missionID)
{
AddJobData(missionID, "Type", "GetOrderPolice");
Expand Down
14 changes: 7 additions & 7 deletions includes/grgserver/Dialogs/D_SetSell.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ DialogResponse:SetSell(playerID, response, listItem, inputText[])
SendClientMessageEx(playerID, COLOR_ERROR, StringID:490("The price must be positive!"));
return false;
}
new color1, color2;
new Float:X,
Float:Y,
Float:Z,
Float:health = 100.00;
GetPlayerPos(playerID, X, Y, Z);
MySQLQuery("INSERT INTO `vehicles`(`numberplate`, `posX`, `posY`, `posZ`, `health`, `modelId`, `color1`, `color2`) VALUES ('ND-%d%d%d%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d')",random(5),random(5),random(5),random(5), X, Y, Z, health, vehicleID, color1, color2);
VehicleProperty:vehicleID[OWNERUSERID] = 0;
VehicleProperty:vehicleID[PRICE] = price;
VehicleProperty:vehicleID[SELLERUSERID] = PVar:playerID[USERID];
Float:Angle,
Float:health = 10000.00,
Float:currentfuel = 100.00;
new modelID = GetVehicleModel(vehicleID);
GetVehiclePos(vehicleID, X, Y, Z);
GetVehicleZAngle(vehicleID, Angle);
MySQLQuery("INSERT INTO `vehicles`(`numberplate`, `posX`, `posY`, `posZ`, `angle`, `price`, `health`, `modelId`, `color1`, `color2`, `currentFuel`) VALUES ('ND-%d%d%d%d', '%f', '%f', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%f')",random(5),random(5),random(5),random(5), X, Y, Z, Angle, price, health, modelID, 23+random(10), 23+random(10), currentfuel);
SendClientMessageEx(playerID, COLOR_INFO, StringID:491("You have released your vehicle for sale"));
RemovePlayerFromVehicle(playerID);
return true;
Expand Down
10 changes: 9 additions & 1 deletion includes/grgserver/Functions/CheckSpeedCamera.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ CheckSpeedCamera(playerID)
{
if (!PVar:playerID[SPEEDCAM_LIMITREACHED])
{
new price = VehicleProperty:vehicleID[SPEED]/100*14;
PVar:playerID[SPEEDCAM_LIMITREACHED] = true;
SendClientMessageEx(playerID, COLOR_ERROR, StringID:453("You are driving too fast! (%d km/h; Max: %d km/h)"), VehicleProperty:vehicleID[SPEED], speedCameras[closestSpeedCamera][SPEEDCAMERA_SPEEDLIMIT]);
SendClientMessageEx(playerID, COLOR_ERROR, StringID:453("You are driving too fast! (%d km/h; Max: %d km/h) it Cost %f"), VehicleProperty:vehicleID[SPEED], speedCameras[closestSpeedCamera][SPEEDCAMERA_SPEEDLIMIT], price);
PVar:playerID[MONEY] = -price;
PVar:playerID[DOTS] = PVar:playerID[DOTS]+1;
if (PVar:playerID[DOTS] >= 3)
{
SendClientMessageEx(playerID, COLOR_ERROR, StringID:39("You have lost your Car License! You have to mutch Dots!"));
// TODO: Remove License
}
}
}
else
Expand Down
4 changes: 2 additions & 2 deletions includes/grgserver/Functions/CreateJob.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CreateJob(playerID, jobID)
CreateJob(playerID, jobID, modelID)
{
MySQLQuery("INSERT INTO `missions` (`jobId`, `creatorUserId`, `creationTime`) VALUES ('%d', '%d', NOW())", jobID, PVar:playerID[USERID]);
MySQLQuery("INSERT INTO `missions` (`jobId`, `data`, `type`,`creatorUserId`, `creationTime`) VALUES ('%d', '%d','GetOrderedVehicle', '%d', NOW())", jobID, modelID, PVar:playerID[USERID]);
return mysql_insert_id();
}
1 change: 1 addition & 0 deletions includes/grgserver/Functions/LoadPlayer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ LoadPlayer(playerID)
PVar:playerID[ONLINETIME] = strval(GetMySQLField("onlineTime"));
PVar:playerID[SKIN] = strval(GetMySQLField("skin"));
PVar:playerID[SHOWCLOCK] = strval(GetMySQLField("showClock"));
PVar:playerID[DOTS] = strval(GetMySQLField("Dots"));
SetPlayerMoney(playerID, MONEY_CASH, floatstr(GetMySQLField("money")));

// Bank stuff
Expand Down
1 change: 1 addition & 0 deletions includes/grgserver/Structures/enum_playerVariable.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum enum_playerVariable
PVAR_DIALOGPROPERTYID,
PVAR_DIALOGPICKUPID,
PVAR_DRIVINGSCHOOL_TYPE,
PVAR_DOTS,
PVAR_FLYCAM_DUMMYOBJECT,
PVAR_FLYCAM_TIMER,
PVAR_FRIENDUSERID,
Expand Down
12 changes: 10 additions & 2 deletions scriptfiles/languagestrings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@
Auftrag erstellt (Auftragsnummer: %d)
</de>
</string>
<string id="39">
<en>
You have Lost your Car License! You Have to mutch Dots!
</en>
<de>
Du hast dein Auto Schein verloren! Du hast zu viele Punkte!
</de>
</string>
<string id="40">
<en>
Please use the format DD.MM.YYYY!
Expand Down Expand Up @@ -907,10 +915,10 @@
</string>
<string id="134">
<en>
There are currently no missions available for your job!
341A There are currently no orders available for your job!
</en>
<de>
Aktuell stehen keine Missionen für deinen Job zur Verfügung!
Es ist keine Arbeit in deinem Beruf Verfügbar!
</de>
</string>
<string id="135">
Expand Down

0 comments on commit 6323fff

Please sign in to comment.
0