SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Archive

 
 
Thread Tools Display Modes
Old 16/04/2012, 08:26 PM   #1
$uRí
Banned
 
Join Date: Apr 2012
Posts: 26
Reputation: 1
Post Strtok

Helló, van valami baja a gépemnek a sccanfal, és ugy tudom a strtok is olyasmi mint a sscanf valaki ezt a 2 parancsot meg csinálná nekem strtok -ra?
Nem értek a sscanf -hoz sem és a strtok -hoz sem!

Code:
CMD:felvesz(playerid, params[])
{
	new gid, name[MAX_PLAYER_NAME];
	GetPlayerName(gid, name, sizeof(name));
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Nem vagy főadmin!");
	if(sscanf(params, "u", gid)) return SendClientMessage(playerid, COLOR_GREY, "Használat: /felvesz [ID]!");
	format(file, sizeof(file), "/rendor/%s.ini", name);
	if(dini_Exists(file)) return SendClientMessage(playerid, COLOR_RED, "A játékos már Rendőr!");
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Felvetted a játékost Rendőrnek!");
	SendClientMessage(gid, COLOR_LIGHTBLUE, "Felvett egy Adminisztrátor Rendőrnek!");
	dini_Create(file);
	return 1;
}

CMD:elvesz(playerid, params[])
{
    new gid, name[MAX_PLAYER_NAME];
	GetPlayerName(gid, name, sizeof(name));
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Nem vagy főadmin!");
	if(sscanf(params, "u", gid)) return SendClientMessage(playerid, COLOR_GREY, "Használat: /elvesz [ID]!");
	format(file, sizeof(file), "/rendor/%s.ini", name);
	if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_RED, "A játékos eddig sem volt Rendőr!");
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Kirúgtad a játékós a Rendőr melóbol!!");
	SendClientMessage(gid, COLOR_LIGHTBLUE, "A Főnők kirúgot a Rendőr Munkábol!");
	dini_Remove(file);
	return 1;
}
$uRí is offline  
Old 17/04/2012, 08:04 AM   #2
$uRí
Banned
 
Join Date: Apr 2012
Posts: 26
Reputation: 1
Default Re: Strtok

Téma zárható! Megoldva!
$uRí is offline  
 

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
omg xD strtok help! Rivera Help Archive 10 03/04/2011 09:41 AM
strtok? waza75 Help Archive 11 06/01/2010 06:44 PM
Help with strtok xLowrider Help Archive 5 05/12/2009 09:37 AM
Help with strtok xLowrider Help Archive 12 04/12/2009 11:40 AM
Strtok together! addysnow1 Help Archive 8 18/11/2009 10:41 PM


All times are GMT. The time now is 06:19 PM.


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