SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romānă/Romanian > Salonul Scripturilor

Reply
 
Thread Tools Display Modes
Old 18/06/2012, 12:18 PM   #1
SkL_MD
Big Clucker
 
SkL_MD's Avatar
 
Join Date: May 2012
Location: Romania
Posts: 147
Reputation: 1
Default CheckPoint

In acest tutorial am sa va invat cum sa faceti un Checkpoint

Mai īntai de toate aveti nevoie pawno
In al doilea rand ai nevoie de ceva cunostinte de baza pawno

Include:
Code:
#include <a_samp>
#include <zcmd>
Voi folosi ZCMD

Definim:
Code:
#define COLOR_WHITE 0xFFFFFFAA
Mergem sus in script si adaugam:
Code:
new CP[MAX_PLAYERS];
Creeam comanda:
Code:
CMD:lucru(playerid, params[])
{
CP[playerid] =1; 
SetPlayerCheckpoint(playerid, 1577.3411,1504.8600,10.5608, 4.0); //Aeroportul LV
SendClientMessage(playerid,COLOR_WHITE,"Mesajul");
return 1;
}
Mergem la OnPlayerCheckpoint:
Code:
public OnPlayerEnterCheckpoint(playerid)
{
if (CP[playerid] ==1)
{
DisablePlayerCheckpoint(playerid); 
SendClientMessage(playerid,COLOR_WHITE"Mesajul"); 
GivePlayerMoney(playerid, +15000); 
}
return 1;
}
Acum sa creeam comanda pentru stop:
Code:
CMD:stop(playerid, params[])
{
DisablePlayerCheckpoint(playerid); 
SendClientMessage(playerid, COLOR_WHITE, "Mesajul");
GivePlayerMoney(playerid, -1000); 
return 1;
}
Cod final:
Code:
#include <a_samp>
#include <zcmd> 
#define COLOR_WHITE 0xFFFFFFAA
new CP[MAX_PLAYERS];
CMD:lucru(playerid, params[])
{
CP[playerid] =1; 
SetPlayerCheckpoint(playerid, 1577.3411,1504.8600,10.5608, 4.0);
SendClientMessage(playerid,COLOR_WHITE,"Mesajul");
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if (CP[playerid] ==1)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_WHITE"Mesajul");
GivePlayerMoney(playerid, +15000);
}
return 1;
CMD:stop(playerid, params[])
{
DisablePlayerCheckpoint(playerid); 
SendClientMessage(playerid, COLOR_WHITE, "Mesajul");
GivePlayerMoney(playerid, -1000); 
return 1;
}
}
Sper ca ati inteles ceva din acest tutorial
SkL_MD is offline   Reply With Quote
Old 18/06/2012, 12:57 PM   #2
Skaizo
Gangsta
 
Skaizo's Avatar
 
Join Date: Sep 2010
Location: Romanian
Posts: 858
Reputation: 15
Default Re: CheckPoint

)
ai creat brackets si 4 erori
si pentru ce ai creat comanda stop?
atat ai creat checkpoint?ehh...asta nui tot,CreateDynamicCP,
si
public OnPlayerEnterCheckpoint(playerid)
{
if (CP[playerid] ==1)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_WHITE"Mesajul");
GivePlayerMoney(playerid, +15000);
}
si return 1; dupa brackets?)
__________________
My works(Romanian)
Thanks To Jansish For Signature
[Tutorial]rezolvarea eroare pawno failed to set data for si File or function is not found
I am Russian?
No
You are Russian army fuck?
Yes but no Fuck
Lol )

Last edited by Skaizo; 22/06/2012 at 03:18 PM.
Skaizo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with checkpoint Rafa Scripting Help 3 06/09/2011 02:11 PM
Checkpoint !help! Assyria Help Archive 5 16/04/2010 05:19 AM
How to know who's at the checkpoint? krawN Help Archive 2 14/07/2009 06:03 PM
Checkpoint ? UsaBoy91 Help Archive 2 11/07/2009 08:46 PM
checkpoint id? nesty Help Archive 3 08/05/2009 08:22 PM


All times are GMT. The time now is 11:50 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.