[Map] Petit garage utile avec gille qui s'ouvre et se ferme
#1

Bonjour а tous !

Aujourd'hui je vous prйsente ma toute premiиre map, il s'agit d'un petit garage avec une grille qui peut s'ouvrir et se fermer.
Cette map peut кtre utile pour les dйbutants, il y a en tout 10 objects.
La grille du garage s'ouvre avec la commande /gouvrir et se ferme avec /gfermer.

Dans mon script j'ai mis que c'est un garage rйserver seulement pour les admins (rcon), vous pouvez le modifier.
Voici quelques screens :
[center]
[Image: 313783samp004.png]
[Image: 668891samp005.png]
[Image: 697799samp006.png]
[/center]


Mapping:
[pawn]
garage = CreateObject(980,1101.80004883,-1741.69995117,15.30000019,0.00000000,0.00000000,270.00000000);
CreateObject(3749,1103.00000000,-1741.59997559,18.29999924,0.00000000,0.00000000,272.00000000);
CreateObject(972,1098.40002441,-1766.69995117,12.50000000,0.00000000,0.00000000,0.00000000);
CreateObject(972,1087.80004883,-1774.00000000,12.39999962,0.00000000,0.00000000,270.00000000);
CreateObject(972,1068.69995117,-1774.00000000,12.30000019,0.00000000,0.00000000,270.00000000);
CreateObject(972,1061.80004883,-1763.00000000,12.39999962,0.00000000,0.00000000,180.00000000);
CreateObject(972,1061.80004883,-1745.40002441,12.50000000,0.00000000,0.00000000,179.99450684);
CreateObject(972,1073.30004883,-1738.90002441,12.69999981,0.00000000,0.00000000,89.99450684);
CreateObject(972,1091.00000000,-1739.00000000,12.50000000,0.00000000,0.00000000,89.99450684);
CreateObject(972,1098.40002441,-1763.59997559,12.39999962,0.00000000,0.00000000,0.00000000);
[/pawn]

Code PAWN pour la grille :
[pawn]
// A placer en haut du script
new garage;

// A placer dans OnPlayerCommandText
if(strcmp("/gouvrir", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Tu ne peut pas utiliser cette commande!");
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1101.80004883, -1741.69995117, 15.30000019)) return SendClientMessage(playerid, COLOR_GREY, "Tu n'est pas devant la grille du garage!");
{
MoveObject(garage, 1101.80004883, -1741.69995117, 9.30000019, 3.5); //(position ouverte)
}
}
return 1;
}

if(strcmp("/gfermer", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Tu ne peut pas utiliser cette commande!");
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1101.80004883, -1741.69995117, 15.30000019)) return SendClientMessage(playerid, COLOR_GREY, "Tu n'est pas devant la grille du garage!");
{
MoveObject(garage, 1101.80004883, -1741.69995117, 15.30000019, 3.5); //(position fermйe)
}
}
return 1;
}
[/pawn]

Je vous est crйer une petite commande pour vous y tйlйporter si vous ne voyez pas ou c'est:
[pawn]
// A placer dans OnPlayerCommandText:
if(!strcmp("/gotogarage", cmdtext, true))
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid,1118.0812,-1740.9161,13.3984);
SendClientMessage(playerid, COLOR_WHITE, "Tu as йtй tйlйportй au garage.");
}
else
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicle, 1118.0812,-1740.9161,13.3984);
SendClientMessage(playerid, COLOR_WHITE, "Tu as йtй tйlйportй au garage avec ta voiture.");
}
return 1;
}
[/pawn]

Voila j'attend vos avis, c'est juste une toute petite map!
Reply
#2

T'a pas d'inspiration c'est un truc de fou ><'
Reply
#3

Je vais l'amйliorer c'est que le dйbut
Reply
#4

Mapping Prit directement de West Coast, tu as fait la copie conforme
Reply
#5

J'ai pas fait de copie j'ai juste fait un petit garage pour les admins
Reply
#6

Tu pourrais faire en sorte que la grille se referme automatiquement.

Ahhhh je dйteste quand les grilles s'ouvrent de cette maniиre, de haut en bas. On est obliger d'attendre que toute la grille ait disparue... Privilйgie une ouverture latйrale.

Il te manque 3 tags dans ta fonction MoveObject...
Reply
#7

Je sais qui manque des tags mais sa marche quand mкme
Reply
#8

Franchement tu as fait cette map trop vite ! il as des trou entre les parois ...

et puis c'est pas trиs beau .. а amйliorer
3/10
Reply
#9

Hadrien;2030690 Wrote:Bonjour а tous !

Aujourd'hui je vous prйsente ma toute premiиre map, il s'agit d'un petit garage avec une grille qui peut s'ouvrir et se fermer.
Cette map peut кtre utile pour les dйbutants, il y a en tout 10 objects.
La grille du garage s'ouvre avec la commande /gouvrir et se ferme avec /gfermer.

Dans mon script j'ai mis que c'est un garage rйserver seulement pour les admins (rcon), vous pouvez le modifier.
Voici quelques screens :
[center]
[Image: 313783samp004.png]
[Image: 668891samp005.png]
[Image: 697799samp006.png]
[/center]


Mapping:
[pawn]
garage = CreateObject(980,1101.80004883,-1741.69995117,15.30000019,0.00000000,0.00000000,270.00000000);
CreateObject(3749,1103.00000000,-1741.59997559,18.29999924,0.00000000,0.00000000,272.00000000);
CreateObject(972,1098.40002441,-1766.69995117,12.50000000,0.00000000,0.00000000,0.00000000);
CreateObject(972,1087.80004883,-1774.00000000,12.39999962,0.00000000,0.00000000,270.00000000);
CreateObject(972,1068.69995117,-1774.00000000,12.30000019,0.00000000,0.00000000,270.00000000);
CreateObject(972,1061.80004883,-1763.00000000,12.39999962,0.00000000,0.00000000,180.00000000);
CreateObject(972,1061.80004883,-1745.40002441,12.50000000,0.00000000,0.00000000,179.99450684);
CreateObject(972,1073.30004883,-1738.90002441,12.69999981,0.00000000,0.00000000,89.99450684);
CreateObject(972,1091.00000000,-1739.00000000,12.50000000,0.00000000,0.00000000,89.99450684);
CreateObject(972,1098.40002441,-1763.59997559,12.39999962,0.00000000,0.00000000,0.00000000);
[/pawn]

Code PAWN pour la grille :
[pawn]
// A placer en haut du script
new garage;

// A placer dans OnPlayerCommandText
if(strcmp("/gouvrir", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Tu ne peut pas utiliser cette commande!");
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1101.80004883, -1741.69995117, 15.30000019)) return SendClientMessage(playerid, COLOR_GREY, "Tu n'est pas devant la grille du garage!");
{
MoveObject(garage, 1101.80004883, -1741.69995117, 9.30000019, 3.5); //(position ouverte)
}
}
return 1;
}

if(strcmp("/gfermer", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Tu ne peut pas utiliser cette commande!");
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1101.80004883, -1741.69995117, 15.30000019)) return SendClientMessage(playerid, COLOR_GREY, "Tu n'est pas devant la grille du garage!");
{
MoveObject(garage, 1101.80004883, -1741.69995117, 15.30000019, 3.5); //(position fermйe)
}
}
return 1;
}
[/pawn]

Je vous est crйer une petite commande pour vous y tйlйporter si vous ne voyez pas ou c'est:
[pawn]
// A placer dans OnPlayerCommandText:
if(!strcmp("/gotogarage", cmdtext, true))
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid,1118.0812,-1740.9161,13.3984);
SendClientMessage(playerid, COLOR_WHITE, "Tu as йtй tйlйportй au garage.");
}
else
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicle, 1118.0812,-1740.9161,13.3984);
SendClientMessage(playerid, COLOR_WHITE, "Tu as йtй tйlйportй au garage avec ta voiture.");
}
return 1;
}
[/pawn]

Voila j'attend vos avis, c'est juste une toute petite map!
sa na pas marcher a l'aide !! skype: nazim.cherouana
********: alfa drive (nazim)
Reply
#10

voila C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(50) : error 017: undefined symbol "garage"
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(51) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(52) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(62) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(73) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(76) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(127) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(132) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(137) : error 017: undefined symbol "COLOR_WHITE"
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(144) : error 017: undefined symbol "COLOR_WHITE"
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(148) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(148) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(151) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(154) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(154) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(154) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(157) : warning 217: loose indentation
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(160) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(160) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(160) : error 004: function "OnPlayerStateChange" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(165) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(165) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(165) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(170) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(170) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(170) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(175) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(175) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(175) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(180) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(180) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(180) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(185) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(185) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(185) : error 004: function "OnRconCommand" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(190) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(190) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(190) : error 004: function "OnPlayerRequestSpawn" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(195) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(195) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(195) : error 004: function "OnObjectMoved" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(200) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(200) : error 029: invalid expression, assumed zero
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(200) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(205) : warning 225: unreachable code
C:\Users\NAZIM\Desktop\ALFA DRIVE\server\gamemodes\GM.pwn(205) : error 029: invalid expression, assumed zero

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)