Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-12-11, 20:58


Adrianek1







Wiek: 36
Na forum: 4958 dni
Posty: 136
Nick w MP: Forcer

Piwa: 1434

Respekt: 37,1

siema
zrobilem /prezent
i chce zeby tworzylo mi prezenty ile chce i mozna je bylo wszystkie zebrac
aktualnie jest tak ze tworzy pickupy z prezentami ale mozna zebrac tylko ten ostatni stworzony prezent a reszty nie mozna co jest zle?

Kod:

if(BagEnabled && PagPickup == pickupid && !IsAdmin(playerid, 1))
{
GivePlayerCash(playerid, PagCash);
new PagxExp = random(150);
Player[playerid][Exp] += PagxExp;
if(Player[playerid][Level] < GetPlayerLevel(playerid))
LevelUp(playerid);

new String[255];
format(String, sizeof(String), "›› |info| {879AF7}Gracz {9A9AFF}%s (%d) {879AF7}znalaz? prezent. Zgarnia %d$ i %d exp.", PlayerName2(playerid), playerid, PagCash, PagxExp);
SendClientMessageToAll(COLOR_RED, String);
DestroyPickup(PagPickup);
PagCash = 0;
PagEnabled = false;
return 1;
}

Kod:



CMD:prezent(playerid, params[]) {

if(!IsAdmin(playerid, 1))
return SendClientMessage(playerid, COLOR_ERROR, "›› |b??d| Nie jeste? moderatorem.");

new Cash;
new expe;
if(sscanf(params, "dds[255]", Cash, expe))
return SendClientMessage(playerid, COLOR_ERROR, "›› |b??d| Wpisz: /prezent [kasa] [exp] ");
if(Cash < 100 || Cash > 100000)
return SendClientMessage(playerid, COLOR_ERROR, "›› |b??d| Niepoprawna suma. Max 100k");
if(expe < 10 || expe > 500)
return SendClientMessage(playerid, COLOR_ERROR, "›› |b??d| Niepoprawna ilosc expa.");


if(PagEnabled) DestroyPickup(PagPickup);//jezeli jest prezent

new Float:PlayerPos[3];
GetPlayerPos(playerid, PlayerPos[0], PlayerPos[1], PlayerPos[2]);
PagPickup = CreatePickup(19056, 23, PlayerPos[0] + 2.0,PlayerPos[1] + 1.0, PlayerPos[2]);
BagxExp = expe;
BagEnabled = true;
BagCash = Cash;

new String[255];
format(String, sizeof(String), "›› |info| {8CED15}Miko?aj {8CED15}gdzie? na mapie zgubi? prezent pe?ny forsy i exp.");
SendClientMessageToAll(COLOR_ERROR, String);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-11, 23:19


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

http://pastebin.com/aBe2KSWj

Nudzilo mi sie wiec trzymaj ale mam nadzieje ze wiesz co masz z tym zrobic bo nie chce mi sie tlumaczyc.

Postaw piwo autorowi tego posta
 

 
Tagi: prezent
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku