• 05 Juin 2026, 04:21:24


Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.


Messages - KPMod

Pages: [1] 2 3
1
 ::)


Up siouplé !

2
Ben ça mets jamais la bonne, je spawn à n'importe quelle maison..

3
Nouveau soucis, mon personnage respawn jamais devant la bonne maison, les clés ne sont pas les bonnes, quand je fais /vendremaison, ça dit que j'ai pas de maison...
Je sais vraiment pas quoi faire. Quelqu'un saurait m'aider? :(

4
super, bug réglé.
Merci de ton aide Tux ! (J'ai du modif 2/3 trucs mais la solution vient de toi :) )

5
Ben je l'ai faite, elle n'y était pas avant.

6
forward SaveProperty();
public SaveProperty()
{
new idx;
new File:file2;
idx = 1;
while (idx < sizeof(HouseInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i\n",
HouseInfo[idx][hEntrancex],
HouseInfo[idx][hEntrancey],
HouseInfo[idx][hEntrancez],
HouseInfo[idx][hExitx],
HouseInfo[idx][hExity],
HouseInfo[idx][hExitz],
HouseInfo[idx][hHealthx],
HouseInfo[idx][hHealthy],
HouseInfo[idx][hHealthz],
HouseInfo[idx][hArmourx],
HouseInfo[idx][hArmoury],
HouseInfo[idx][hArmourz],
HouseInfo[idx][hOwner],
HouseInfo[idx][hDiscription],
HouseInfo[idx][hValue],
HouseInfo[idx][hHel],
HouseInfo[idx][hArm],
HouseInfo[idx][hInt],
HouseInfo[idx][hLock],
HouseInfo[idx][hOwned],
HouseInfo[idx][hRooms],
HouseInfo[idx][hRent],
HouseInfo[idx][hRentabil],
HouseInfo[idx][hTakings],
HouseInfo[idx][hVec],
HouseInfo[idx][hVcol1],
HouseInfo[idx][hVcol2],
HouseInfo[idx][hDate],
HouseInfo[idx][hLevel],
HouseInfo[idx][hWorld]);
if(idx == 1)
{
file2 = fopen("maison/property.cfg", io_write);
}
else
{
file2 = fopen("maison/property.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}

if(strcmp(cmd, "/achetermaison", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
{
format(string, sizeof(string), "   Vous devez être au niveau %d pour acheter cette maison !", HouseInfo[h][hLevel]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "   Vous possédez déjà une maison, utilisez /vendremaison pour vendre votre maison actuel !");
return 1;
}
if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
{
   Delete3DTextLabel(Text3D:housesale);
PlayerInfo[playerid][pPhousekey] = h;
HouseInfo[h][hOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
SafeGivePlayerMoney(playerid,-HouseInfo[h][hValue]);
PlayerPlayMusic(playerid);
GameTextForPlayer(playerid, "~w~Bienvenue Chez Vous~n~Vous pouvez /entrer à tout moment ", 5000, 3);
SendClientMessage(playerid, COLOR_WHITE, "Félicitation, pour votre nouvelle achat !");
SendClientMessage(playerid, COLOR_WHITE, "Utilisez /aide pour passer en revue les aides des propriétés !");
                        DateProp(playerid);
OnPropUpdate();
SaveProperty();
OnPlayerUpdate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "  Vous n'avez pas assez d'argent !");
return 1;
}
}
}
}
return 1;
}

if(strcmp(cmd, "/vendremaison", true) == 0)
{
   if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pPhousekey] == 255)
{
SendClientMessage(playerid, COLOR_WHITE, " Vous n'avez aucune maison.");
return 1;
}
if(PlayerInfo[playerid][pMarried] > 0)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Vous êtes marié, vous ne pouvez pas vendre la maison !");
       return 1;
   }
if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
new house = PlayerInfo[playerid][pPhousekey];
HouseInfo[house][hHel] = 0;
HouseInfo[house][hArm] = 0;
HouseInfo[house][hHealthx] = 0;
HouseInfo[house][hHealthy] = 0;
HouseInfo[house][hHealthz] = 0;
HouseInfo[house][hArmourx] = 0;
HouseInfo[house][hArmoury] = 0;
HouseInfo[house][hArmourz] = 0;
HouseInfo[house][hLock] = 1;
HouseInfo[house][hOwned] = 0;
HouseInfo[house][hVec] = 418;
HouseInfo[house][hVcol1] = -1;
HouseInfo[house][hVcol2] = -1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(HouseInfo[house][hOwner], "Etat", 0, strlen("Etat"), 255);
//ConsumingMoney[playerid] = 1;
SafeGivePlayerMoney(playerid,HouseInfo[house][hValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new string1[MAX_PLAYER_NAME];
format(string, sizeof(string), "~w~Felicitations!~n~ Vous avez vendu votre maison pour ~n~~g~$%d", HouseInfo[house][hValue]);
GameTextForPlayer(playerid, string, 10000, 3);
format(string1, sizeof(string), "[SALE]\n$ %d",HouseInfo[house][hValue]);
housesale = Create3DTextLabel(string1,0x006400FF,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez]+1,15,0,1);
PlayerInfo[playerid][pPhousekey] = 255;
SaveProperty();
if(PlayerInfo[playerid][pLocal] == house)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
}
OnPropUpdate();
OnPlayerUpdate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Vous n'êtes pas propriétaire d'une maison.");
}
}
return 1;
}

Voilou.

PS.

Une maison c'est censé donner ça dans le "property.cfg".

-1827.236572,-223.033996,18.368999,244.500000,305.000000,999.099975,0,0,0,0,0,0,Etat, Maison,25000,0,0,2,1,0,0,1,0,0,418,-1,-1,113,3,35
Mais à la place j'ai ça.

-991664238,-1017182028,1100149686,1131708416,1134067712,1148831334,0,0,0,0,0,0,0.000000,0.000000,25000,0,0,2,1,0,0,1,0,0,418,-1,-1,113,3,35
:s

7
J'ai fait ça sauf le } après Fclose car je ne vois pas pourquoi.
Soucis.

-Les maisons ont disparues.
-Les voitures ont disparues.

Je suppose que ce n'était pas la meilleure chose à faire... :/.
Une autre solution ?

8
D'accord, merci :).
J'en profite pour faire un petit up.

9
Bonjour j'essaye de faire quelque chose pour "sauvegarder" les maisons dans le GM UniversalLife RP, car cela ne marche pas de base...
Alors j'ai fait ça.

public SaveProperty()
{
new idx;
new File:file2;
idx = 1;
while (idx < sizeof(HouseInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i\n",
HouseInfo[idx][hEntrancex],
HouseInfo[idx][hEntrancey],
HouseInfo[idx][hEntrancez],
HouseInfo[idx][hExitx],
HouseInfo[idx][hExity],
HouseInfo[idx][hExitz],
HouseInfo[idx][hHealthx],
HouseInfo[idx][hHealthy],
HouseInfo[idx][hHealthz],
HouseInfo[idx][hArmourx],
HouseInfo[idx][hArmoury],
HouseInfo[idx][hArmourz],
HouseInfo[idx][hOwner],
HouseInfo[idx][hDiscription],
HouseInfo[idx][hValue],
HouseInfo[idx][hHel],
HouseInfo[idx][hArm],
HouseInfo[idx][hInt],
HouseInfo[idx][hLock],
HouseInfo[idx][hOwned],
HouseInfo[idx][hRooms],
HouseInfo[idx][hRent],
HouseInfo[idx][hRentabil],
HouseInfo[idx][hTakings],
HouseInfo[idx][hVec],
HouseInfo[idx][hVcol1],
HouseInfo[idx][hVcol2],
HouseInfo[idx][hDate],
HouseInfo[idx][hLevel],
HouseInfo[idx][hWorld],
if(idx == 1)
{
file2 = fopen("maison/property.cfg", io_write);
}
else
{
file2 = fopen("maison/property.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}

Soucis, cela me donne ça.

3 erreurs.

C:\x\sf-ulrp.pwn(11444 -- 11475) : error 029: invalid expression, assumed zero
C:\x\sf-ulrp.pwn(11475 -- 11476) : error 029: invalid expression, assumed zero
C:\x\sf-ulrp.pwn(11479) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

Voilà les lignes.

11444 format(coordsstring, sizeof(coordsstring), "%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%f,%f,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i\n",
11475 HouseInfo[idx][hWorld],
11476 if(idx == 1)
{
file2 = fopen("maison/property.cfg", io_write);
       }

11479 else
                               {
file2 = fopen("maison/property.cfg", io_append);
}


Merci d'avance :) !

10
Bonjour à tous, est-ce que quelqu'un à réussit à résoudre le soucis suivant sur ce gamemod ?
Quand j'achète une maison, elle m'appartient bien.. Mais quand le serveur Reboot, elle ne m'appartient plus, alors que sa clef est toujours dans mes stats.
Si quelqu'un a résolu le soucis, ça serait cool de partager.
Merci :)

11
Présentation de projet / Re : CristabRP
« le: 12 Août 2011, 14:16:34 »
Salut cristab, si tu as besoin d'aide au niveau conseil sur le RolePlay, je fais partie d'un staff d'un grand serveur, qui est dans le top 10 des serveurs de Grand Theft Auto au niveau Role Play.
Je peux t'expliquer un peu, te donner des conseils sur le placement, aide sur les factions, etc.. et cela serait avec grand plaisir.

Bien à toi,

KPMod.

12
Problèmes et bugs / Re : Besoin d'aide mapping transparent
« le: 12 Août 2011, 11:01:59 »
D'accodac !

Alors pour tout ceux qui ont ce problème là


-Mettez votre gm en 0.3C.

-Compilez votre GM.

-Mettez la dernière version du Streamer Incognito.

-Mettez #include <streamer> au dessus de votre GameMod, avec les includes.

-Ouvrez server.cfg, mettez plugins streamer.dll.

-Mettez ceci dans votre GM.
dans les "define" vous mettez ça
#define STREAMER_TYPE_OBJECT (0)
#define STREAMER_TYPE_PICKUP (1)
#define STREAMER_TYPE_CP (2)
#define STREAMER_TYPE_RACE_CP (3)
#define STREAMER_TYPE_MAP_ICON (4)
#define STREAMER_TYPE_3D_TEXT_LABEL (5)
#define STREAMER_TYPE_AREA (6)

Ensuite dans votre GameMod vous mettez ça (J'ai mit ça au niveau des Create3DTextLabel, AddStaticPickup).

Streamer_MaxItems(STREAMER_TYPE_OBJECT, 5000);
Streamer_MaxItems(STREAMER_TYPE_PICKUP, 5000);
Streamer_MaxItems(STREAMER_TYPE_CP, 5000);
Streamer_MaxItems(STREAMER_TYPE_RACE_CP, 5000);
Streamer_MaxItems(STREAMER_TYPE_MAP_ICON, 5000);
Streamer_MaxItems(STREAMER_TYPE_3D_TEXT_LABEL, 5000);
Streamer_MaxItems(STREAMER_TYPE_AREA, 5000);

-Ensuite, changez vos "CreateObject" par "CreateDynamicObject" !

Et logiquement c'est bingo !

13
Problèmes et bugs / Re : Besoin d'aide mapping transparent
« le: 11 Août 2011, 21:58:27 »
Ouais, j'avais loupé un truc !

Résolu :)

14
Problèmes et bugs / Re : Besoin d'aide mapping transparent
« le: 11 Août 2011, 21:22:44 »
Merci M4RT1N de ton intervention, ça nous avance .. vraiment.

15
Problèmes et bugs / [SOLUTION] Mapping Transparent.
« le: 11 Août 2011, 20:07:18 »
Voilà, bonjour à tous, j'ai téléchargé le gamemod "Serveur Universal Life Role Play" aujourd'hui.
Je l'ai adapté en 0.3c, j'ai mit le dernier streamer, j'ai mit " Streamer_MaxItems(STREAMER_TYPE_OBJECT, 5000); " en dessous de mon OnGameModeInit, et pourtant, le mapping est toujours transparent..!

J'ai pourtant bien cherché (promis :/) mais je ne trouve plus de solutions..

Un peu d'aide serait le bienvenue, merci d'avance.

Pages: [1] 2 3