[pomoc]/setstat

Započeo .::Wuj0::., Mart 20, 2011, 10:46:56 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Editujem FactionGame
Detaljan opis problema: E 'vako. Admin ima komandu setstat i su moze da mijenja igracu stat, ali jedino shto ne moze da mijenja su sati igre. Da li neko moze da mi pokaze kako to da napravim, ili taj neko da mi napravi to?
Dio skripte: if(strcmp(cmd, "/setstat", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setstat [ID Igraca/Dio Imena] [statcode] [amount]");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 SpawnHealth |3 UpgradePoints |4 Model |5 BankAccount");
SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");
SendClientMessage(playerid, COLOR_GRAD2, "|11 FMember |12 Det |13 Lawyer |14 Fixer |15 News |16 Jack |17 Drug");
SendClientMessage(playerid, COLOR_GRAD2, "|18 Sex |19 Box |20 PassKey |21 VehKey1 |22 VehKey2 |23 VehKey3");
return 1;
}
giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setstat [ID Igraca/Dio Imena] [statcode] [amount]");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 SpawnHealth |3 UpgradePoints |4 Model |5 BankAccount");
SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");
SendClientMessage(playerid, COLOR_GRAD2, "|11 FMember |12 Det |13 Lawyer |14 Fixer |15 News |16 Jack |17 Drug");
SendClientMessage(playerid, COLOR_GRAD2, "|18 Sex |19 Box |20 PassKey |21 VehKey1 |22 VehKey2 |23 VehKey3");
return 1;
}
new stat;
stat = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setstat [ID Igraca/Dio Imena] [statcode] [amount]");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Level |2 SpawnHealth |3 UpgradePoints |4 Model |5 BankAccount");
SendClientMessage(playerid, COLOR_GRAD3, "|6 PhoneNumber |7 RespectPoints |8 HouseKey |9 BizKey |10 DonateRank");
SendClientMessage(playerid, COLOR_GRAD2, "|11 FMember |12 Det |13 Lawyer |14 Fixer |15 News |16 Jack |17 Drug");
SendClientMessage(playerid, COLOR_GRAD2, "|18 Sex |19 Box |20 PassKey |21 VehKey1 |22 VehKey2 |23 VehKey3");
return 1;
}
new amount;
amount = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
switch (stat)
{
case 1:
{
PlayerInfo[giveplayerid][pLevel] = amount;
format(string, sizeof(string), "   The Player Was Set To Level %d", amount);
}
case 2:
{
PlayerInfo[giveplayerid][pSHealth] = amount;
format(string, sizeof(string), "   The Player Was Set To %d Spawnhealth ", amount);
}
case 3:
{
PlayerInfo[giveplayerid][gPupgrade] = amount;
format(string, sizeof(string), "   The Player Was Set To %d Upgrade Points", amount);
}
case 4:
{
PlayerInfo[giveplayerid][pModel] = amount;
format(string, sizeof(string), "   The Player Was Set To Model %d", amount);
}
case 5:
{
PlayerInfo[giveplayerid][pAccount] = amount;
format(string, sizeof(string), "   The Player Account Was Set To $%d", amount);
}
case 6:
{
PlayerInfo[giveplayerid][pPnumber] = amount;
format(string, sizeof(string), "   The Player Phone Number Was Set To %d", amount);
}
case 7:
{
PlayerInfo[giveplayerid][pExp] = amount;
format(string, sizeof(string), "   The Player Respect Points Were Set To %d", amount);
}
case 8:
{
PlayerInfo[giveplayerid][pPhousekey] = amount;
format(string, sizeof(string), "   The Player House Key Was Set To %d", amount);
}
case 9:
{
PlayerInfo[giveplayerid][pPbiskey] = amount;
format(string, sizeof(string), "   The Player Business Key Was Set To %d", amount);
}
case 10:
{
PlayerInfo[giveplayerid][pDonateRank] = amount;
format(string, sizeof(string), "   The Player DonateRank Was Set To %d", amount);
}
case 11:
{
PlayerInfo[giveplayerid][pFMember] = amount;
format(string, sizeof(string), "   The Player Family Member Was Set To %d", amount);
}
case 12:
{
PlayerInfo[giveplayerid][pDetSkill] = amount;
format(string, sizeof(string), "   The Player Detective Skill Set To %d", amount);
}
case 13:
{
PlayerInfo[giveplayerid][pLawSkill] = amount;
format(string, sizeof(string), "   The Player Lawyer Skill Set To %d", amount);
}
case 14:
{
PlayerInfo[giveplayerid][pMechSkill] = amount;
format(string, sizeof(string), "   The Player Car Mechanic Skill Set To %d", amount);
}
case 15:
{
PlayerInfo[giveplayerid][pNewsSkill] = amount;
format(string, sizeof(string), "   The Player News Reporter Skill Set To %d", amount);
}
case 16:
{
PlayerInfo[giveplayerid][pJackSkill] = amount;
format(string, sizeof(string), "   The Player Car Jacker Skill Set To %d", amount);
}
case 17:
{
PlayerInfo[giveplayerid][pDrugsSkill] = amount;
format(string, sizeof(string), "   The Player Drug Dealer Skill Set To %d", amount);
}
case 18:
{
PlayerInfo[giveplayerid][pSexSkill] = amount;
format(string, sizeof(string), "   The Player Sex Skill Set To %d", amount);
}
case 19:
{
PlayerInfo[giveplayerid][pBoxSkill] = amount;
format(string, sizeof(string), "   The Player Box Skill Set To %d", amount);
}
case 21:
{
    PlayerInfo[giveplayerid][pPcarkey] = amount;
    format(string, sizeof(string), "   The Player VehKey1 Set To %d", amount);
}
case 22:
{
    PlayerInfo[giveplayerid][pPcarkey2] = amount;
    format(string, sizeof(string), "   The Player VehKey2 Set To %d", amount);
}
case 23:
{
    PlayerInfo[giveplayerid][pPcarkey3] = amount;
    format(string, sizeof(string), "   The Player VehKey3 Set To %d", amount);
}
case 77:
{
PlayerInfo[giveplayerid][pJob] = amount;
format(string, sizeof(string), "   The Player Job Set To %d", amount);
}
case 88:
{
PlayerInfo[giveplayerid][pContractTime] = amount;
format(string, sizeof(string), "   The Player Job Contract Time Set To %d", amount);
}
default:
{
format(string, sizeof(string), "   Invalid Stat Code", amount);
}

}
SendClientMessage(playerid, COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   niste ovlasteni da koristite tu komandu!");
}
}//not valid id
}//not connected
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Ajde,Ajde da divljamo kao stoka da pijemo,crno bele da bodrimo,jer Partizan mi volimo....!!!!

Don't learn to hack. Hack to learn!

Pa jenostavno odes u scriptfiles i users i tamo mu stavis sate igre.

Da..Luis Ali ako ode u User Udje U Neci acc i zeli da mu promeni Sate Naprimer...Kad igrac oce da udje Nemoze da se uloguje..Zato Koristi pawno Preko pawna To uradi I kad namestis sate Samo compile imaces 2 erora...To N\egledaj To ti je uvek tako.....TAKO JA RADIM I SVE MI JE OK...

------------------------------------------------------------------------------
Zahvaljujem Se Snich_Wolf-u Zato sto Mi je mnogo Pomogo oko Skriptanja...Snich Hvala brt <3 xD

Citat: [Bp]jovan poslato Mart 20, 2011, 12:39:54 POSLE PODNE
Da..Luis Ali ako ode u User Udje U Neci acc i zeli da mu promeni Sate Naprimer...Kad igrac oce da udje Nemoze da se uloguje..Zato Koristi pawno Preko pawna To uradi I kad namestis sate Samo compile imaces 2 erora...To N\egledaj To ti je uvek tako.....TAKO JA RADIM I SVE MI JE OK...
Zavisi koji mod koristi,i kada das admina onda ti je pogresan password jel ga odmah menja a ti kada u usersu promenis pass neces se logovati,a za sate ja sam siguran 99,9 % da ce moci ovako kako je luis rekao (nikada nisam imao takvih problema pa i samim tim ne znam,ali kazem ti ...;)