Your first script - discussion.
#1

Many users are experienced scripters, but they had to start from somewhere also!

We are all making mistakes while scripting, that is the only way to learn. ( Not only but it counts as 98% ).

Well, I'm going to share my first script I've ever made. How time passes I m learning too.

This is my first script EVER made! ( Well when I say ever I mean something real, not just random stuff in PAWNo )

This is link for download : http://www.mediafire.com/file/rzsjvo...0t/badword.pwn

For lazy guys:

Well, I 've not changed anything, so laugh as much as you can Why would you? I didn't know anything!

You should post your first script if you have it!
PHP код:
    // Bad Word//
#include <a_samp>
#pragma unused playerid
enum badword Bad_Word [24] }  
new 
bWord [] [badword] = {
    {
"pussy"},
    {
"nigga},
    {"
u fucked ur mom"},
    {"
fool"},
    {"
sex"} };
    
public OnPlayerText(playerid, text []) {
 if (IsStringBad(playerid, text ==1)  { return 1 } 
    return 1; }
    
stock IsStringBad(playerid, string []) {
    for(new 1=0;i<sizeof (bWord);1++)
    if(strifind(string, bWord [i] [Bad_Word], true)!=-1) {
    OnePlayerSwear(playerid, string, bWord[i][Bad_Word]); 
    return 1; } }
 return 0; )
 
 stock OnPlayerSwear(playerid, string[], bad_word[]) {
  SendClientMessage(playerid, -1 "
[FFFFFF][Serverdont swear !");
  return 1
  
 public OnGameModeInt
  AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0,);
  return 1; } 
Reply
#2

How impressive, you knew about #pragma when you was a starter, nice
Reply
#3

my first ever script was this (i think):
Код:
#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int a,b;
cout<<"Input two numbers ";
cin>>a>>b;
cout<<"Sum = "<<a+b;
getch();
}
Reply
#4

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
my first ever script was this (i think):
Код:
#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int a,b;
cout<<"Input two numbers ";
cin>>a>>b;
cout<<"Sum = "<<a+b;
getch();
}
I guess that was my first script in C++ too lol. I spent hours figuring out why the console closes once it finished.
Reply
#5

PHP код:
public OnPlayerUpdate(playerid) {
    
OnPlayerUpdate(playerid);
    
SendClientMessage(playerid, -1"Hi.");
    return 
1;

Reply
#6

https://sampforum.blast.hk/showthread.php?tid=492691 lol.

Script's gone though, but it was horribly written, lots of if and else if statements instead of a simple switch statement.
Reply
#7

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
How impressive, you knew about #pragma when you was a starter, nice
I took it from one video, ... ee.

What can I say guys? Well done :'D
Reply
#8

Gate commands for a server when I was a mapper. Each gate had its own command

Something like /openprisongate1 password
Reply
#9

Quote:
Originally Posted by oMa37
Посмотреть сообщение
PHP код:
public OnPlayerUpdate(playerid) {
    
OnPlayerUpdate(playerid);
    
SendClientMessage(playerid, -1"Hi.");
    return 
1;

I bet it never told you hi
Reply
#10

Adrenaline StuntWorld Gamemode was my first scripting effort. Not really proud of it. Random , poorly optimized unfinished things inside it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)