|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 305
Reputation: 38
|
I defined this
Code:
#define PickUpCreator "Pickup.ini" Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/createpickup",true) == 0)
{
if(!IsPlayerAdmin(playerid) ) return SendClientMessage(playerid,COLOR_RED,"You must be admin!! (RCON)");
else ShowPlayerDialog(playerid,100,DIALOG_STYLE_INPUT,"Create Pickup","Write the id of your pickup.!","Create","Cancel");
return 1;
}
return 1;
}
Code:
if(dialogid == 100)
{
if(!response) return 1;
if(response)
{
new Float:X,Float:Y,Float:Z;
new VirtualWorld;
VirtualWorld = GetPlayerVirtualWorld(playerid);
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(inputtext[0],1,X,Y,Z,VirtualWorld);
if(!fexist(PickUpCreator) )
{
dini_Create(PickUpCreator);
dini_IntSet(PickUpCreator,"Pickup", CreatePickup(inputtext[0],-1,X,Y,Z,VirtualWorld));
}
}
}
and this is what i get in Pickup.ini Code:
Pickup=5 |
|
|
|
|
|
#2 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jul 2012
Location: Mostar, Bosnia and Herzegovina
Posts: 457
Reputation: 52
|
I sucks with dini but i think its not
pawn Code:
pawn Code:
|
|
|
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Nov 2011
Location: Indonesia
Posts: 126
Reputation: 23
|
Store it to string using "format"
pawn Code:
|
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 305
Reputation: 38
|
no because if(dini_Exists(PickUpCreator) ) verify if file exist not if not....
i think my wrong is here Code:
dini_IntSet(PickUpCreator,"Pickup", CreatePickup(inputtext[0],-1,X,Y,Z,VirtualWorld)); ERROR: : from your line Code:
D:\Servere de samp\Server\filterscripts\PickupCreator.pwn(57) : error 035: argument type mismatch (argument 3) Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error. Code:
dini_IntSet(PickUpCreator,"Pickup", str); EDIT: Now it don't write ...nothing when i look in Pickup.ini like if a created it with cmd |
|
|
|
|
|
#5 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 305
Reputation: 38
|
Removed
Last edited by XStormiest; 13/07/2012 at 07:05 PM. |
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2009
Location: California, USA
Posts: 2,614
Reputation: 162
|
I have tested the code and everything came out fine for me.
pawn Code:
Here's the .ini file output. Code:
Pickup=CreatePickup(49,-1, 1959.363037, 1343.861206, 15.374607, 0) And may I suggest you learn how to indent your coding, holy crap. |
|
|
|
|
|
#7 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 305
Reputation: 38
|
I think is a problem from my server test..i will create another one fine Steven and Andi_Evandy will be on credits because helped me , i wanted to put this on net!
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dini problem | Tanush123 | Scripting Help | 1 | 07/02/2012 03:00 AM |
| dini problem | knackworst | Scripting Help | 8 | 07/10/2011 06:24 PM |
| dini problem | Tanush123 | Help Archive | 1 | 24/08/2011 08:42 AM |
| Dini Problem | Blokkmonsta | Help Archive | 1 | 27/11/2010 06:20 PM |
| problem with DINI | nuriel8833 | Help Archive | 0 | 11/08/2009 10:33 AM |