Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - shaheersa

Pages: [1] 2
1
mIRC/pawn Scripting / Re: Want anything in pawn? Ask here!
« on: March 08, 2013, 08:42:27 am »

2
mIRC/pawn Scripting / Re: [PAWN]Bug list 0.3z
« on: March 01, 2013, 01:52:01 pm »
Hello guys! After release  pawno version I began to work on RPG mod. But when creating confronted with such problems:
GivePlayerMoney - function does not work
CreateVehicle - creates a car, but you can see only after rejoining to serv
ResetPlayerMoney - not working
PutPlayerInVehicle and PutDirectlyInVehicle absolutely the same function. Why? In addition, they do not work if you are already in the car.
SetVehiclePos - does not work if you sit in this car
SetPlayerSkin - not working

SetVehicleDoorsStatus (vehicleid, bool);
SetVehicleAlarm (vehicleid, bool);
GetWeaponName
ChangeVehicleColor

not working ...

GameModeExit(); - leads to server crash
IsPlayerInVehicle - leads to server crash

I hope that functions will be work in future.

Other bugs:

Spawn Func: I think player must be spawned once in game. And after player spawn vc-mp by default always give start money 2000. This is unnecessary.

Request Class: In callback OnGameModeInit i always must add SetPlayerStartPos. Why? Make easier such as a sa-mp.
Just add SetPlayerPos func in callback OnPlayerSpawn

Events:
All events written by default. This is unnecessary, because developers wanna set personal text.

Interiors:
SetPlayerInterior and GetPlayerInterior are not implemented
add DisableInteriorEnterExits func as in sa-mp. I think any devs wanna disable default entrances.

Player Positions:
why this function needs the angle of rotation?
add function SetPlayerZAngle as in sa-mp

Camera Func:
Why all camera functions have not playerid parametr?

Vehicle Functions:
I think it lacks some useful functions as...
GetVehicleModel
GetVehicleColor


Later i will write other bugs.

SetVehiclePos bug fix:
[pawn]public OnPlayerExitVehicle(playerid,vehicleid)
{
EjectPlayerFromVehicle(playerid);
return 1;
}[/pawn]

GivePlayerMoney bug fix:
[pawn]public IncPlayerMoney(playerid, amount)
{
new fmoney;
fmoney = GetPlayerMoney(playerid);
SetPlayerMoney(playerid, fmoney +amount);
return 1;
}[/pawn]

for createvehicle i think use instead addstaticvehicle

3
mIRC/pawn Scripting / Re: Want anything in pawn? Ask here!
« on: March 01, 2013, 08:14:18 am »
Oh god, Pawn is single threaded which means every thing is done one by one, which also means the vehicle will be deleted before the script can even crate the new one DERPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

so, that IS the correct order

4
Snippet Showroom / Re: Anti insult for all scripts
« on: February 16, 2013, 04:31:42 pm »
This would only work if the player types any of the following insults infront...

E.g:

~Script kicks in~
player1:fuck you!!
player1 has been kicked...

~Script ignores everything~
player1_smartguy:you bitch..


Here this one works:
http://forum.vicecitymultiplayer.com/index.php?topic=5576.0

5
mIRC/pawn Scripting / Re: just a little appeal/help
« on: February 08, 2013, 08:16:28 am »
please if you have any script cmd
like
/c getcar
/c getveh
or
!getcar
!getveh
post here


since im not on my computer now, i cant give you, but i have the cmd

6
mIRC/pawn Scripting / Re: Can You Fix !heal cmd i have made it!!?
« on: February 08, 2013, 08:13:34 am »
I saw the error, just copy this script and it will be fixed
One Error-----------> Unfriend Symbol  >Cost<  in last line (if else)
Can u plz fix it?
[pawn]else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      new Float:Health; GetPlayerHealth( playerid, Health );
      if ( strcmp( GetPlayerLocation( playerid ), "Hospital-Vice-Point-Vice-City-Beach", true ) == 1 ) SendClientMessage( playerid, COLOR_GREEN, "Pm>>>Go To Drug Store For Health." );
        else if ( Health >= 100 ) SendClientMessage( playerid, COLOR_GREEN, "Pm>>>You are healthy." );
        else if ( GetPlayerHandCash( gPlayers[ playerid ] ) < 5000 ) SendClientMessage( playerid, COLOR_GREEN, "You Don't Have Enough Cash" );//The error was here
      else
  {
         SetPlayerHealth( playerid, 100.0 );
         DecPlayerHandCash( playerid, 5000 );
         SetTimer( "HealthTimer",5000,1);
            SendClientMessage( playerid, COLOR_GREEN, "Successfully Healed." );
      }
      return 1;
      }
[/pawn]

7
Snippet Showroom / Re: Anti-Insult and Anti-ClanCheat systems by me
« on: February 03, 2013, 03:19:35 pm »
I actually made this for my friend (VK.Angel.OfDeath) to see it. but i am not doing things like PM so i can share it with you guys :P

8
Snippet Showroom / Anti-Insult and Anti-ClanCheat systems by me
« on: February 02, 2013, 10:36:05 pm »
hi all
i think even some advanced scripters wont know that, but, i will show you some of the 2 systems ive made
the anti insult works like that: if like anyone types a abusing word example "monfuck" it detects the "fuck" and kicks them 100% tested even if they type "you fucker" it detects "fuck" and kicks them. Here is the code

This is the anti insult system

Put this under onplayertext

[pawn]public OnPlayerText(playerid, cmdtext[])//you may have OnPlayerText(playerid) change it to OnPlayerText(playerid, cmdtext)
CheckInsult(playerid, cmdtext);[/pawn]

Make a public CheckInsult(playerid, c[])
[pawn]   new cde[256]; cde = "CountRegisters";
   if (strfind(c, "fuck", true) != -1 || strfind(c, "*****", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
   if (strfind(c, "******", true) != -1 || strfind(c, "bullshit", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
   if (strfind(c, "ass", true) != -1 || strfind(c, "stupid", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
   if (strfind(c, "gay", true) != -1 || strfind(c, "sexy", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
    return 0;[/pawn]

this is the anti-clancheat system

Put this under public OnPlayerCommandText(playerid, cmdtext)
[pawn]
public OnPlayerCommandText(playerid, cmdtext)
      if (strcmp(cmd, "clan", true) == 0) {
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if (IsLevel(playerid,6)) return 0;//Change IsLevel(playerid,6) to what you use to check if player is a admin
      else if (!strlen(tmp)) SendClientMessage(playerid, GREEN,"ERROR: Invalid Syntax - Use  /c %s <playerid/name>.",cmdtext);
      else {
           if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid, GREEN,"ERROR: Unknown player."); else {
                pInfo[plr][ClanUSA] = 1;//Change it to what you use as PlayerInfo
               }
      }
      return 1;
   }[/pawn]

Put this under OnPlayerSpawn(playerid,classid,teamid)
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
    if (pInfo[playerid][ClanUSA] = 0) {
   NickPlayerChar(playerid);
    }[/pawn]

Make a public NickPlayerChar(playerid)
[pawn]public NickPlayerChar(playerid)
{

    if(IsInClan(gPlayers[playerid]))
   {
   SendClientMessage(playerid, COLOR_RED, "CONNECTION REJECTED");
   SendClientMessage(playerid, COLOR_RED, "YOU HAVE BEEN KICKED");
   SendClientMessage(playerid, COLOR_RED, "ADMIN: SYSTEM REASON: NOT IN CLAN USA");
   Kick(playerid);
   SendClientMessageToAll(playerid, COLOR_RED, "Admin System kicked %s. Reason: Not in clan USA",gPlayers[playerid]);
   }
}[/pawn]

Now make a public IsInClan(c)
[pawn]public IsInClan(c[])
{
   new cde[256]; cde = "CountRegisters";
   if (strfind(c, "USA", true) != -1) return 1;//Replace USA with your clan
        else return 0;
    return 1;
}[/pawn]


Now here you have them. Now you have a insult-free and clancheat-free server!
You might have some warnings, but ignore them its tested 100% works

9
mIRC/pawn Scripting / Re: help me
« on: January 26, 2013, 04:15:39 pm »
no i need a cmd like /c autofix on and /c autofix off

put this on where you can find it can be put

[pawn]public autofix(playerid)
{
      if(!IsPlayerInAnyVehicle(playerid)) return 1;
              else if ( (GetPlayerVehicleID(playerid) == 155) || ( GetPlayerVehicleID(playerid) == 177) ) return 1;
      else
         {
         SetVehicleTyre(GetPlayerVehicleID(playerid), 1);
         SetVehicleLights(GetPlayerVehicleID(playerid), 0);
         SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
         }
}[/pawn]

put this under onplayercommandtext

[pawn]public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp(cmd, "autofix", true) == 0)
 {
       tmp = strtok(cmdtext, idx);
        if (!strlen(tmp)) SendClientMessage(playerid, 0x660000AA,"Error: Invalid Syntax - Use /c autofix [on/off]";
       else {
         if(strcmp(tmp, "on", true) == 0)
          {
         new plaque[244];
         format(plaque,244,"autofix(playerid)");
         SetTimer(plaque, 10, 1);
         }
          else if(strcmp(tmp, "off", true) == 0)
         {
         KillTimer(0);
         return 1;
         }[/pawn]

it will auto-fix the vehicle (god-mode for vehicle)
NOTE: THIS IS NOT TESTED SO MAKE A BACKUP OF SCRIPT AND THIS WILL ONLY WORK IF YOU DONT HAVE OTHER TIMERS

10
mIRC/pawn Scripting / Re: I need help with command /c bringall
« on: January 26, 2013, 03:03:30 pm »
Stop blainly posting commands which cannot be used in other scripts


Quote
if(!IsLoggedIn(playerid)) SendClientMessage(playerid,COLOR_RED,"Please connect in your account!");

is not defined ( public will probably need the enum and more, so anyone to use this shall remove that line )

My script is based on GUPS 1.16

11
try to put in the beginning of your sctipt this string:
[pawn]
#include <Madara>
[/pawn]
If it won't work, check if you got Madara.inc in your includes folder

Well, thats what im asking you, i want the file madara.inc

12
mIRC/pawn Scripting / Re: help me
« on: January 26, 2013, 02:56:24 pm »
put this on where you can find it can be put

[pawn]public autofix(playerid)
{
      if(!IsPlayerInAnyVehicle(playerid)) return 1;
              else if ( (GetPlayerVehicleID(playerid) == 155) || ( GetPlayerVehicleID(playerid) == 177) ) return 1;
      else
         {
         SetVehicleTyre(GetPlayerVehicleID(playerid), 1);
         SetVehicleLights(GetPlayerVehicleID(playerid), 0);
         SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
         }
}
[/pawn]

put this under onplayerconnect

[pawn]public OnPlayerConnect(playerid)
{
   new plaque[244];
   format(plaque,244,"autofix(playerid)");
   SetTimer(plaque, 10, 1)
}[/pawn]


it will auto-fix the vehicle (god-mode for vehicle)
NOTE: THIS IS NOT TESTED SO MAKE A BACKUP OF SCRIPT

13
hi guys im having this error:
Code: [Select]
C:\Users\Hameed\Downloads\Okey_use_this\gamemodes\SOF.pwn(23) : fatal error 100: cannot read from file: "Madara"

Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase


1 Error.

anyone has the file Madara.inc? i know how to fix it  but i cant find the file madara.inc anywhere


I found the file madara.inc, if anyone needs it write it so i will upload it

14
mIRC/pawn Scripting / ...
« on: January 11, 2013, 12:13:52 pm »
ok thanks riders
hey and riders, im [TZ_T]Sword

15
[pawn]   else if(strcmp(cmd,"mute",true) == 0)
   {
   IsPlayerAdmin(playerid);
   {
      new plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c mute [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
      if(PlayerInfo[plr][Muted] == 0)
      {
      PlayerInfo[plr][Muted] = 1;
      new str[256];
      format(str,sizeof(str),"ADMIN %s Muted %s for a long time...",gPlayers[playerid],gPlayers[plr]);
      SendClientMessageToAll(COLOR_WHITE,str);
      SendClientMessage(plr,COLOR_RED,"Stop talking or you will be kicked...");
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"You cannot mute him 2 times..");
      }
      }
      }
      return 1;
      }
            else if(strcmp(cmd,"unmute",true) == 0)
   {
   IsPlayerAdmin(playerid);
   {
      new plr;
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c unmute [Nick/ID]");
        else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
      else {
      if(PlayerInfo[plr][Muted] == 1)
      {
      PlayerInfo[plr][Muted] = 0;
      new str[256];
      format(str,sizeof(str),"ADMIN %s unmuted %s...",gPlayers[playerid],gPlayers[plr]);
      SendClientMessageToAll(COLOR_WHITE,str);
      SendClientMessage(plr,COLOR_RED,"You are free to talk...");
      }
      else
      {
      SendClientMessage(playerid,COLOR_RED,"You cannot unmute him without being muted..");
      }
      }
      }
      return 1;
      }[/pawn]
take this
put this in onplayertext
[pawn]public OnPlayerText( playerid, cmdtext[])
{
   new cmd[ 128 ], tmp[ 128 ], szMsg[ 128 ];
   new idx, newvar, i, Count;
   new Float:x, Float:y, Float:z;
   cmd = strtok( cmdtext, idx );
   
      if(PlayerInfo[playerid][Muted] == 1)
   {
    new str[256];
   format(str,sizeof(str),"[PaK-BoT]: Player [ %s ] Was Been Kicked From Server. Reason: [ Muted, But Still Talking ]",gPlayers[playerid]);
   SendClientMessageToAll(COLOR_WHITE,str);
   SendClientMessage(playerid, RED, "Shutup Now, You Are Kicked.");
   Kick(playerid);
    return 0;
   }[/pawn]
[pawn]public OnPlayerDisconnect( playerid, reason )
{
    PlayerInfo[playerid][Muted] = 0;[/pawn]
put this in enum pInfo
[pawn]
Muted,[/pawn]
and ok good luck installing this
need help free to ask
/c mute = Impossible in Pawn, Possible in Squirrel
/c reloadscript = Impossible in Pawn, Possible in Squirrel
1 cuestion mute is possible in pawn but only.work if the player use t and write the message
but if player use /me or another command not work
reload.script?
not is possible reload script in any script sq or pawn

well i saw reload script on VCCNR (althrough its on linux not windows and its sq)
and i dont want auto-kick if player types
i want the echo: off
if echo is off then /me and /msg wont work as well

Pages: [1] 2