SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Closed Thread
 
Thread Tools Display Modes
Old 02/02/2013, 06:19 PM   #3241
Roach_
Huge Clucker
 
Roach_'s Avatar
 
Join Date: Sep 2012
Posts: 281
Reputation: 35
Default Re: Script Request Thread #5

Quote:
Originally Posted by MadafakaPro View Post
Well that encode and decode thing
ex When player joins it sets his name in the file as Madafaka_00Pro or sometimes Madafaka_14Pro ...
You want to be simple ?
Roach_ is offline  
Old 02/02/2013, 06:23 PM   #3242
nguyenquynh
Banned
 
Join Date: Sep 2012
Posts: 94
Reputation: 0
Default Re: Script Request Thread #5

You help me to create a safe area within tens of meters k guns and attack others that only the police and the other faction use duoc.Toi very thank you, please help me
nguyenquynh is offline  
Old 02/02/2013, 06:31 PM   #3243
MadafakaPro
Big Clucker
 
Join Date: May 2012
Posts: 193
Reputation: -7
Default Re: Script Request Thread #5

Quote:
Originally Posted by Roach_ View Post
You want to be simple ?
Yes. .
MadafakaPro is offline  
Old 02/02/2013, 07:08 PM   #3244
Roach_
Huge Clucker
 
Roach_'s Avatar
 
Join Date: Sep 2012
Posts: 281
Reputation: 35
Default Re: Script Request Thread #5

Quote:
Originally Posted by MadafakaPro View Post
Yes. .
Try this:
pawn Code:
/*
 *            DUDB functions
 *       (c) Copyright 2006-2007 by DracoBlue
 *
 * @version   : 2.4
 * @author    : DracoBlue ([url]http://dracoblue.net[/url])
 * @date      : 8th May 2006
 * @update    : 12th July 2007
 * @require   : DUtils 1.10
 * @require   : DINI 1.5
 *
 * This Unit is provided as is (no warranties).
 * Feel free to use it, a little message in
 * about box is honouring thing, isn't it?
 *
 */


#if defined _dudb_included
  #endinput
#endif

#define _dudb_included
#pragma library dutils

#include <dutils>
#include <dini>
#define dUser(%1).( udb_User(%1,
#define dUserINT(%1).( udb_UserInt(%1,
#define dUserSet(%1).( udb_UserSet(%1,
#define dUserSetINT(%1).( udb_UserSetInt(%1,
#define dUserSetFLOAT(%1).( udb_UserSetFloat(%1,
#define dUserFLOAT(%1).( udb_UserFloat(%1,

stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}

stock udb_encode(nickname[]) {
  new tmp[MAX_STRING];
  set(tmp,nickname);
  return tmp;
}

stock udb_decode(nickname[]) {
  new tmp[MAX_STRING];
  set(tmp,nickname);
  return tmp;
}


stock udb_Exists(nickname[]) {
  new tmp[MAX_STRING];
  format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname));
  return fexist(tmp);
}


stock udb_Remove(nickname[]) {
  new tmp[MAX_STRING];
  format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname));
  return dini_Remove(tmp);
}

stock udb_UserSetInt(nickname[],key[],value) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  return dini_IntSet(fname,key,value);
}

stock udb_UserSetFloat(nickname[],key[],Float:value) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  return dini_FloatSet(fname,key,value);
}

stock udb_UserSet(nickname[],key[],value[]) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  return dini_Set(fname,key,value);
}

stock udb_User(nickname[],key[]) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  format(fname,sizeof(fname),dini_Get(fname,key));
  return fname;
}

stock Float:udb_UserFloat(nickname[],key[]) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  return dini_Float(fname,key);
}

stock udb_UserInt(nickname[],key[]) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  return dini_Int(fname,key);
}

stock udb_CheckLogin(nickname[],pwd[]) {
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  if (udb_UserInt(nickname,"password_hash")==udb_hash(pwd)) return true;
  return false;
}


stock udb_Create(nickname[],pwd[]) {
  if (udb_Exists(nickname)) return false;
  new fname[MAX_STRING];
  format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
  dini_Create(fname);
  udb_UserSetInt(nickname,"password_hash",udb_hash(pwd));
  return true;
}

stock udb_RenameUser(nickname[],newnick[]) {
  new oldfname[MAX_STRING];
  new newfname[MAX_STRING];
  format(oldfname,sizeof(oldfname),"%s.dudb.sav",udb_encode(nickname));
  format(newfname,sizeof(newfname),"%s.dudb.sav",udb_encode(newnick));
  return frenametextfile(oldfname,newfname);
}
Roach_ is offline  
Old 02/02/2013, 08:56 PM   #3245
Hade.
Huge Clucker
 
Hade.'s Avatar
 
Join Date: Oct 2012
Location: Tallinn, Estonia
Posts: 210
Reputation: 16
Default Re: Script Request Thread #5

Quote:
Originally Posted by Hade. View Post
I need a derby system, heres my command below. I need that the limit is 4 people, i have 4 cars. And the last one in the derby, who has smashed all cars gets 10'000$, really need it.


Code:
CMD:derby(playerid, params[])
{
    new str7[128], player8[MAX_PLAYER_NAME];
    GetPlayerName(playerid, player8, sizeof(player8));
    format(str7,sizeof(str7),"%s teleportis end derbysse [/derby]",player8);
    SendClientMessageToAll(COLOR_GREEN,str7);
    new rand = random(sizeof(D1Rand));
    SetPlayerPos(playerid, D1Rand[rand][0], D1Rand[rand][1], D1Rand[rand][2]);
    SendClientMessage(playerid, COLOR_NGREEN,"Teleportisid end derbysse!");
    ResetPlayerWeapons(playerid);
    nocmd[playerid] = 1;
    return 1;
}
Roach or someone, can you please do it for me i didnt understand and i need it pretty much.
__________________
Hade. is offline  
Old 03/02/2013, 05:03 PM   #3246
RavGaming
Little Clucker
 
Join Date: Dec 2012
Posts: 5
Reputation: 0
Default Re: Script Request Thread #5

Could any one help me make an MDC with the dialog menu my current one is just nothing but a few commands and text! in the dialog menu could you make it have an
1. Database
2. Issue Warrant
3. Wanted
4. Profile ( Basically shows your name! and custom text i wanna put in)

Could you make it have comments so i can learn off of it! Thanks!
RavGaming is offline  
Old 03/02/2013, 08:12 PM   #3247
032.Marcus
Little Clucker
 
Join Date: Jun 2011
Posts: 14
Reputation: 0
Default Re: Script Request Thread #5

Hello guys, i want to make my own GameMode.
I know PAWN for Counter-Strike 1.6, and I'm learning C Programing in School.
But PAWN for SA:MP is similar to C+, so i need some help.
Can u give me best to Tutorials step by step for RolePlay MOD.
I found for Register & Log-In Sistem, but i need help what to do next.
I can make Jobs, Organizations Alone.
Please, answer me soon as possible.
Thank you.
032.Marcus is offline  
Old 04/02/2013, 12:28 AM   #3248
andrewgrob
Huge Clucker
 
Join Date: Apr 2009
Posts: 290
Reputation: 48
Default Re: Script Request Thread #5

hi. i need a mapper to make me 10 tdm maps

i am willing to pay 5.00 pound each via paypal for them [thats 50 pound]

so you will need paypal go to www.paypal.com

they are for my new server opening soon (3 weeks)

i need whoever is going to map them.. or if 10 people want to map 1 map each [thats fine]

i need you to add my skype andrewgrob2012

the maps i want are call of duty style

so place boxes for cover. create tunnels ect

i am currently creating my first map which i am calling titan tdm

its a spaceship

good luck and thank you & remember a good map takes 3 days or more

dont be asking me to buy a map that has taken 3 mins
andrewgrob is offline  
Old 04/02/2013, 07:50 PM   #3249
kristijan250
Little Clucker
 
Join Date: Sep 2012
Posts: 19
Reputation: 0
Default Re: Script Request Thread #5

Need fare in zcmd
kristijan250 is offline  
Closed Thread

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
Re: Script Request Thread #3 clean180ollie Help Archive 836 05/01/2010 05:08 PM
Script Request Thread #2 Dol Help Archive 807 28/07/2009 10:09 AM
Script Request Thread kaisersouse Help Archive 1112 20/03/2009 12:15 PM


All times are GMT. The time now is 05:01 AM.


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