Can't connect modes - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can't connect modes (
/showthread.php?tid=195049)
Can't connect modes -
MAD_Evil - 01.12.2010
Hi all. I need some help to connect 2 tutorials in one system.
I took house system (
https://sampforum.blast.hk/showthread.php?tid=179206) and made business based on this system.
Next i took earn system (public Payouttimer) from this tutorial (
https://sampforum.blast.hk/showthread.php?tid=149416) but i have some issue.
I add line (SetPVarInt(playerid, "Businessearnings" , GetPVarInt(playerid, "Businessearnings") + BusinessInfo[buss][BusEarn])
![Wink](images/smilies/wink.png)
in my command buy and sell business
Now i have add payout earn to saved business in
Код:
if(strlen(dini_Get("Business.ini", Filename)))
{
format(BusInfo[ID][BusOwner], 24, "%s", dini_Get("Business.ini", Filename));
BusInfo[ID][Owned] = 1;
BusInfo[ID][Icon] = SetPlayerMapIconEx(Pickupx, Pickupy, Pickupz, 36, 1);
}
After this I add lines to get the playerid and pass it Payouttimer
Код:
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
if(strcmp(playername2, BusInfo[ID][BusOwner], true, strlen(BusInfo[ID][BusOwner])) == 0)
{
return i;
}
}
}
SetPVarInt(BusInfo[ID][BusOwner], "Businessearnings" , GetPVarInt(BusInfo[ID][BusOwner], "Businessearnings") + BusInfo[ID][BusEarn]);
but this is no work. Can anyone help me how to get the playerid and pass it to Payouttimer to make it work.
Thanks.
Sorry for my bad english.