Jump to content

Question

Posted

Nick: D0WN3D

Problema: Caut un referreal system bun

Erori / warnings: --

Lini/script: ---

Ai incercat sa rezolvi singur ?: DA....nu am reusit :))

2 answers to this question

Recommended Posts

Posted

Nick: D0WN3D

Problema: Caut un referreal system bun

Erori / warnings: --

Lini/script: ---

Ai incercat sa rezolvi singur ?: DA....nu am reusit :))

Ce nu ai reusit ? Arata ce ai incercat.

7bdea99b11.png

rimmon curv.

Posted

command(referral, playerid, params[])
{
new Name[128], string[128], string2[128], IP[21], IPRef[21];

if(sscanf(params, "z", Name))
{
if(Player[playerid][PlayingHours] >= 0)
{
SendClientMessage(playerid, WHITE, "SYNTAX: /referral [name]");
SendClientMessage(playerid, GREY, "Type the FULL NAME of your referral, and not an ID");
SendClientMessage(playerid, GREY, "NOTE: This command is CaSe SeNsItIvE.");
}
}
else
{
if(Player[playerid][PlayingHours] >= 0)
{
if(strlen(Name) >= 3 && strlen(Name) < MAX_PLAYER_NAME+1)
{
format(string2, sizeof(string2), "Accounts/%s.ini", Name);
if(fexist(string2))
{
if(Player[playerid][PlayingHours] >= 3)
{
SendClientMessage(playerid, WHITE, "You already have more than two playing hours, you cannot do this anymore!");
}
else
{
SendClientMessage(playerid, WHITE, "You added %s succesfully as your referral!", Name);
SendClientMessage(playerid, WHITE, "If you had a referral already, that one will be replaced by the new one!");
format(Player[playerid][Ref], 255, Name);
}
}
else
{
SendClientMessage(playerid, WHITE, "Account not found. Remember this command is CaSe SeNsEtIvE ");
}
}
}
}
return 1;
}

Am gasit asta pe net si am incercat sa il introduc in GM. dar imi tot da unele errori.

Guest
This topic is now closed to further replies.
×
×
  • 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. For more details you can also review our Terms of Use and Privacy Policy.