PDA

View Full Version : Converting !


Red_Dragon.
03/10/2012, 03:59 PM
public OnPlayerCommandText(playerid, cmdtext)
{
if(!strcmp("/carwash", cmdtext, true))
{
if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == 2)
{
new var0 = 0;
while(++var0 < 89)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
{
SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
return 1;
}
I need this to be ZCMD instead of STRCMP if any one can do it and thanks :)

dannyk0ed
03/10/2012, 04:00 PM
CMD:carwash(playerid, parmas[])
{
if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == 2)
{
new var0 = 0;
while(++var0 < 89)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
{
SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
return 1;
}

CaRa
03/10/2012, 04:02 PM
CMD:carwash(playerid, params [])
{
if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == 2)
{
new var0 = 0;
while(++var0 < 89)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
{
SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
return 1;
}
}
}
}
}
return 1;
}

Red_Dragon.
03/10/2012, 04:03 PM
Now i have these errors: E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(141) : error 035: argument type mismatch (argument 1)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(141) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(151) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(176) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(176) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(187) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(187) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(192) : error 010: invalid function or declaration
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(389) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(389) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(393) : warning 203: symbol is never used: "carwash"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

CaRa
03/10/2012, 04:05 PM
CMD:carwash(playerid, params [])
{
if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == 2)
{
new var0 = 0;
while(++var0 < 89)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
{
SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
return 1;
}
}
}
}
}
return 1;
}

Put this command where you want in your gamemode not in Onplayercommandtext.

SA-MPDrifter
03/10/2012, 04:06 PM
Place it outside any callback.

Red_Dragon.
03/10/2012, 04:20 PM
But i want it in an FS so i want it under OnPlayerCommandText i do not want it in my GM is that possible ?

Ghost_Boii
03/10/2012, 04:26 PM
We Can make it as FS but better add it in the gamemode

Red_Dragon.
03/10/2012, 04:28 PM
So ?!?!? i just need it in an FS because not only this command is in the FS so if i wanted it to be in the GM i will do many things

Ghost_Boii
03/10/2012, 04:31 PM
Man don't add under onplayercommandtext
Because it is ZCMD

mamorunl
03/10/2012, 04:34 PM
Even in your FilterScript you put it outside of OnPlayerCommandText.

Red_Dragon.
03/10/2012, 04:43 PM
How mamournl ?

Ghost_Boii
03/10/2012, 04:45 PM
In filterscript also we should not add ZCMD Command under that

Red_Dragon.
03/10/2012, 04:47 PM
So how do i add in the FS somebody say something useful please!

mamorunl
03/10/2012, 05:05 PM
So how do i add in the FS somebody say something useful please!

We are all saying something useful, it is you who is ignorant to solve your dilemma. Put the code OUTSIDE of OnPlayerCommandText even in your filterscript. Just like you would in your gamemode. So, outside any callback.

Red_Dragon.
03/10/2012, 05:20 PM
Okay nevermind of this now i have another problem i make some mapping in MTA then convert it through convertffs.com then i take it and put it in the script and compile it but In-Game when i go to the place SUPPOSED to be there what i mapped ? but i do not find anything (I have the latest streamer plugin)

Ghost_Boii
03/10/2012, 05:25 PM
Its Your Map Problem

Red_Dragon.
03/10/2012, 05:27 PM
Please stat clearly what do you mean by your map problem ?

Ghost_Boii
03/10/2012, 05:30 PM
You should use YSF plugin also to make it work
And convert it with output YSI

Red_Dragon.
03/10/2012, 05:32 PM
Should i have YSI include ?

Ghost_Boii
03/10/2012, 05:33 PM
Yes you should

Red_Dragon.
03/10/2012, 05:37 PM
But i do not understand YSI what should i do when i put in the include and like that ?

Ghost_Boii
03/10/2012, 05:38 PM
Download YSI And And Convert Your Map with YSI And it to Your gamemode and compile .Enjoy!

Red_Dragon.
03/10/2012, 05:40 PM
You do not understand me i mean i do not understand YSI i cannot put it in the GM i do not understand YSI language

Ghost_Boii
03/10/2012, 05:42 PM
Map add this in the top of the gamemode
#include <YSI>
And Download the ysi and add it in the include file

Red_Dragon.
03/10/2012, 05:45 PM
Pawno crashes

Ghost_Boii
03/10/2012, 05:48 PM
Take YSF Plugin it will work

Red_Dragon.
03/10/2012, 05:50 PM
I have YSF plugin anyway but it does not load and thanks for the reply ****** and by the way i have the latest streamer plugin

Ghost_Boii
03/10/2012, 05:51 PM
Are You Sure ?

CrazyChoco
03/10/2012, 05:53 PM
I have YSF plugin anyway but it does not load and thanks for the reply ****** and by the way i have the latest streamer plugin

Then there might only be one solution left:'

Buy a jumping monkey and look at that :P

naah kidding, maybe post your Map, so we poissible could convert it ?

Red_Dragon.
03/10/2012, 05:53 PM
If you mean me ? YES AND IT LOADS EVERYTHING GOOD IN THE SCRIPT SO WHY IT DOES NOT LOAD THE MAPPED dynamic object ? i use CreateDynamicObject by the way


EDIT: Sure Choco

CrazyChoco
03/10/2012, 06:13 PM
Tried this ?

CreateDynamicObject(1949,-1391.80004883,-810.09997559,81.00000000,0.00000000,0.00000000,0.0 0000000); //object(barrier_4andy)(1)
CreateDynamicObject(4638,-1390.80004883,-823.59997559,82.19999695,0.00000000,0.00000000,0.0 0000000); //object(paypark_lan01)(1)

Red_Dragon.
03/10/2012, 06:14 PM
Yea i put it in the script but ? does it have a static place to be put in ? like under Onplayercommand text etc...

CrazyChoco
03/10/2012, 06:19 PM
You have to place it in FilterscriptInit(), or if you are using a Gamemode use GamemodeInit(), Correct me if i'm going wrong :P

Red_Dragon.
03/10/2012, 06:24 PM
It is in an Gamemode and i am using GamemodeInit() anyway if i wasn't using GamemodeInit why all OBJECT LOAD EXCEPT MAPPED ONES !?!?

doreto
03/10/2012, 06:36 PM
It is in an Gamemode and i am using GamemodeInit() anyway if i wasn't using GamemodeInit why all OBJECT LOAD EXCEPT MAPPED ONES !?!?

Becose you have to place them into your GamemodeInit() / Filesctipt() (insite them) to load and USE THE DAMM EDIT BUTTON http://forum.sa-mp.com/images/buttons/edit.pnghttp://forum.sa-mp.com/images/buttons/edit.pnghttp://forum.sa-mp.com/images/buttons/edit.pnghttp://forum.sa-mp.com/images/buttons/edit.png

public OnGameModeInit()
{

// place your object code here
return 1;
}

CrazyChoco
03/10/2012, 07:04 PM
To make it easy for you do this.



public OnGameModeInit()
{
CreateObject(1949,-1391.80004883,-810.09997559,81.00000000,0.00000000,0.00000000,0.0 0000000); //object(barrier_4andy)(1)
CreateObject(4638,-1390.80004883,-823.59997559,82.19999695,0.00000000,0.00000000,0.0 0000000); //object(paypark_lan01)(1)

return 1;
}


put the code inside of you Gamemode.

USE THE DAMM EDIT BUTTON http://forum.sa-mp.com/images/buttons/edit.pnghttp://forum.sa-mp.com/images/buttons/edit.pnghttp://forum.sa-mp.com/images/buttons/edit.png Its a way to post hunt.. Not a great idea, might make a ban as it against the Terms.