Jump to content

Ajutor sistem task-uri


mihay111

Recommended Posts

Salut! In curand o sa-mi deschid cu niste prieteni o comunitate. In primul rand vreau sa va zic ca nu ma dau mare scripter si nici nu sunt, abia stiu si eu ceva ceva. 

Am facut un sistem de task-uri, care sa fie asa: la fiecare payday primesti 1 task si cu acel punct vei putea completa un task din /tasks. Daca ai un punct, poti face un task, la completarea acestuia, luandu-ti un punct. Task-urile sunt pe /tasks, nu e ceva complicat ca pe b-zone etc. Si pentru inceput am pus "Intra intr-un infernus", dar nu stiu cum sa fac sa verifice ca intra in maverick. Adica, stiu sa fac daca are 0 pct sa nu reuseasca, daca are 1 sa se completeze task-ul, dar nu se verifica daca intra in infernus.

Am incercat la OnPlayerEnterVehicle si am facut asta:

if(PlayerInfo[playerid][pTasks] >= 1) {
	if(GetVehicleModel(411)) {
					SendClientMessage(playerid, COLOR_TASKS, "Ai completat task-ul!");

					GivePlayerCash(playerid, 1000);

					PlayerInfo[playerid][pTasks] -= 1; 
					Update(playerid, pTasksx);
				}
}

Si nu am primit erori la compilare, doar ca nu primeam banii si mesajul cand intram intr-un Infernus

Si am mai incercat:

if(GetVehicleModel(411)) 
			    {
			    	if(PlayerInfo[playerid][pTasks] = 0) return SCM(playerid, -1. "Nu ai task.");

			    	SCM(playerid, COLOR_TASKS, "Ai completat TASK-UL");
			    	GivePlayerMoney(playerid, 1000);

			    	PlayerInfo[playerid][pTasks] = 0;
					Update(playerid, pTasksx);
				}

Folosesc GM-ul Blue-King RPG. Totul a fost scris la "OnPlayerEnterVehicle"

Va rog frumos sa ma ajutati! Multumesc anticipat!

Edited by Mihai Stanciu
Link to comment
Share on other sites

Incearca

if(PlayerInfo[playerid][pTasks] != 0) {
    if(GetVehicleModel(411)) {
        SendClientMessage(playerid, COLOR_TASKS, "Ai completat task-ul!");

        GivePlayerCash(playerid, 1000);

        PlayerInfo[playerid][pTasks] -= 1; 
        Update(playerid, pTasksx);
    }
}

Link to comment
Share on other sites

Acum 23 minute, [El.Capo] a spus:

Incearca

if(PlayerInfo[playerid][pTasks] != 0) {
    if(GetVehicleModel(411)) {
        SendClientMessage(playerid, COLOR_TASKS, "Ai completat task-ul!");

        GivePlayerCash(playerid, 1000);

        PlayerInfo[playerid][pTasks] -= 1; 
        Update(playerid, pTasksx);
    }
}

pai si if(playerinfo[playerid][pTasks] != 0) asta inseamna ca daca are 0 sa poata, oricum inlocuiesc si vad daca e cv

Link to comment
Share on other sites

Chiar acum, Mihai Stanciu a spus:

pai si if(playerinfo[playerid][pTasks] != 0) asta inseamna ca daca are 0 sa poata, oricum inlocuiesc si vad daca e cv

!= inseamna daca e diferit de suma pe care ai pusa ex != 0 daca este diferit de 0 adica 100 sa ii se execute acel cod

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.